usb: musb-new: sunxi: fix error check
The `musb_register` function returns some ERR_PTR(...) on failure, not NULL, so update the check here appropriately. Signed-off-by: Sam Edwards <CFSworks@gmail.com> Reviewed-by: Marek Vasut <marex@denx.de>
This commit is contained in:
parent
0a8a4b8642
commit
3cbd92da9f
1 changed files with 1 additions and 1 deletions
|
@ -486,7 +486,7 @@ static int musb_usb_probe(struct udevice *dev)
|
|||
#else
|
||||
pdata.mode = MUSB_PERIPHERAL;
|
||||
host->host = musb_register(&pdata, &glue->dev, base);
|
||||
if (!host->host)
|
||||
if (IS_ERR_OR_NULL(host->host))
|
||||
return -EIO;
|
||||
|
||||
printf("Allwinner mUSB OTG (Peripheral)\n");
|
||||
|
|
Loading…
Reference in a new issue