From: Sam Edwards <cfsworks@gmail.com>
To: u-boot@lists.denx.de
Cc: Andre Przywara <andre.przywara@arm.com>,
Jagan Teki <jagan@amarulasolutions.com>,
Marek Vasut <marex@denx.de>,
Maksim Kiselev <bigunclemax@gmail.com>,
Sam Edwards <CFSworks@gmail.com>
Subject: [PATCH 2/3] usb: musb-new: sunxi: fix error check
Date: Fri, 2 Jun 2023 15:49:57 -0600 [thread overview]
Message-ID: <20230602214958.167909-3-CFSworks@gmail.com> (raw)
In-Reply-To: <20230602214958.167909-1-CFSworks@gmail.com>
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>
---
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");
--
2.39.2
next prev parent reply other threads:[~2023-06-02 21:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-02 21:49 [PATCH 0/3] Allwinner sunxi USB gadget improvements Sam Edwards
2023-06-02 21:49 ` [PATCH 1/3] usb: musb-new: sunxi: do not attempt to access NULL SRAMC Sam Edwards
2023-06-05 10:00 ` Marek Vasut
2023-06-05 11:04 ` Andre Przywara
2023-06-07 5:39 ` Sam Edwards
2023-06-07 10:45 ` Andre Przywara
2023-06-07 23:29 ` Sam Edwards
2023-06-02 21:49 ` Sam Edwards [this message]
2023-06-05 10:01 ` [PATCH 2/3] usb: musb-new: sunxi: fix error check Marek Vasut
2023-06-02 21:49 ` [PATCH 3/3] usb: musb-new: sunxi: make compatible with UDC/DM gadget model Sam Edwards
2023-06-05 10:02 ` Marek Vasut
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230602214958.167909-3-CFSworks@gmail.com \
--to=cfsworks@gmail.com \
--cc=andre.przywara@arm.com \
--cc=bigunclemax@gmail.com \
--cc=jagan@amarulasolutions.com \
--cc=marex@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.