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:
Sam Edwards 2023-06-05 11:19:37 -06:00 committed by Marek Vasut
parent 0a8a4b8642
commit 3cbd92da9f

View file

@ -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");