From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Ran Wang <ran.wang_1@nxp.com>,
Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Peter Chen <peter.chen@nxp.com>, Frank Li <Frank.Li@nxp.com>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH] usb: dwc3: Fix an IS_ERR() vs NULL check in dwc3_power_off_all_roothub_ports()
Date: Thu, 8 Feb 2024 23:57:04 +0000 [thread overview]
Message-ID: <20240208235631.oxak7mhys2qslt55@synopsys.com> (raw)
In-Reply-To: <71499112-4ed3-489a-9a56-b4a8ab89cd05@moroto.mountain>
On Wed, Jan 31, 2024, Dan Carpenter wrote:
> The ioremap() function doesn't return error pointers, it returns NULL on
> error. Update the check.
>
> Fixes: 2d2a3349521d ("usb: dwc3: Add workaround for host mode VBUS glitch when boot")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
> drivers/usb/dwc3/host.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c
> index ae189b7a4f8b..4e6239d3a0ac 100644
> --- a/drivers/usb/dwc3/host.c
> +++ b/drivers/usb/dwc3/host.c
> @@ -35,7 +35,7 @@ static void dwc3_power_off_all_roothub_ports(struct dwc3 *dwc)
> /* xhci regs is not mapped yet, do it temperary here */
> if (dwc->xhci_resources[0].start) {
> xhci_regs = ioremap(dwc->xhci_resources[0].start, DWC3_XHCI_REGS_END);
> - if (IS_ERR(xhci_regs)) {
> + if (!xhci_regs) {
> dev_err(dwc->dev, "Failed to ioremap xhci_regs\n");
> return;
> }
> --
> 2.43.0
>
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Thinh
prev parent reply other threads:[~2024-02-08 23:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-31 7:10 Dan Carpenter
2024-02-08 23:57 ` Thinh Nguyen [this message]
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=20240208235631.oxak7mhys2qslt55@synopsys.com \
--to=thinh.nguyen@synopsys.com \
--cc=Frank.Li@nxp.com \
--cc=dan.carpenter@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=peter.chen@nxp.com \
--cc=ran.wang_1@nxp.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®