[PATCH 2/3] usb: musb-new: sunxi: fix error check
Marek Vasut
marex at denx.de
Mon Jun 5 12:01:39 CEST 2023
On 6/2/23 23:49, Sam Edwards wrote:
> The `musb_register` function returns some ERR_PTR(...) on failure,
> not NULL, so update the check here appropriately.
>
> Signed-off-by: Sam Edwards <CFSworks at gmail.com>
> ---
> drivers/usb/musb-new/sunxi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/musb-new/sunxi.c b/drivers/usb/musb-new/sunxi.c
> index 6e60dd47e0..65a528e229 100644
> --- a/drivers/usb/musb-new/sunxi.c
> +++ b/drivers/usb/musb-new/sunxi.c
> @@ -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");
Reviewed-by: Marek Vasut <marex at denx.de>
Can you please send this one separately, so I can pick it for current
release ?
More information about the U-Boot
mailing list