mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user