usb: musb-new: sunxi: fix error check
Subsystems (2)
PATCH RESEND 1/1 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 <[email protected]>
Reviewed-by Marek Vasut <[email protected]>
--- drivers/usb/musb-new/sunxi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/musb-new/sunxi.c +1 -1
@@ -488,7 +488,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" );
Signature · 1 line
2.39.2
Marek Vasut
AppliedQuoted 2 lines · Sam Edwards
The
musb_registerfunction returns someERR_PTR(...)on failure, not NULL, so update the check here appropriately.
Applied to usb/master, thanks .