summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Edwards <cfsworks@gmail.com>2023-06-05 20:19:37 +0300
committerMarek Vasut <marex@denx.de>2023-06-08 00:38:51 +0300
commit3cbd92da9f49bbff630a615887132da03444ce43 (patch)
treef4732fc3f62c74cd4b1a06be95750f7ff9e48d01
parent0a8a4b86422650d6955a2382796089735453902d (diff)
downloadu-boot-3cbd92da9f49bbff630a615887132da03444ce43.tar.xz
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>
-rw-r--r--drivers/usb/musb-new/sunxi.c2
1 files changed, 1 insertions, 1 deletions
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");