From: Sam Edwards Date: Mon, 5 Jun 2023 17:19:37 +0000 (-0600) Subject: usb: musb-new: sunxi: fix error check X-Git-Url: http://git.dujemihanovic.xyz/%22http:/www.sics.se/static/git-favicon.png?a=commitdiff_plain;h=3cbd92da9f49bbff630a615887132da03444ce43;p=u-boot.git 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 Reviewed-by: Marek Vasut --- diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c index dc4cfc2194..dac98aec1e 100644 --- a/drivers/usb/musb-new/sunxi.c +++ b/drivers/usb/musb-new/sunxi.c @@ -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");