From: Bixuan Cui <cuibixuan@huawei.com>
To: <linux-kernel@vger.kernel.org>, <agross@kernel.org>
Cc: <john.wanghui@huawei.com>, <bjorn.andersson@linaro.org>,
<balbi@kernel.org>, <gregkh@linuxfoundation.org>,
<mgautam@codeaurora.org>, <linux-arm-msm@vger.kernel.org>,
<linux-usb@vger.kernel.org>, Bixuan Cui <cuibixuan@huawei.com>
Subject: [PATCH] usb: dwc3: qcom: Fixed an issue that the ret value is incorrect in dwc3_qcom_probe()
Date: Fri, 9 Apr 2021 08:49:45 +0800 [thread overview]
Message-ID: <20210409004945.56776-1-cuibixuan@huawei.com> (raw)
There is a error message after devm_ioremap_resource failed, and the ret
is needs to be obtained through PTR_ERR(qcom->qscratch_base).
We need to move the dev_err() downwards to ensure that the ret value is
correct.
Fixes: a4333c3a6ba9 ('usb: dwc3: Add Qualcomm DWC3 glue driver')
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Bixuan Cui <cuibixuan@huawei.com>
---
drivers/usb/dwc3/dwc3-qcom.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c
index e37cc58dfa55..4716ca8c753d 100644
--- a/drivers/usb/dwc3/dwc3-qcom.c
+++ b/drivers/usb/dwc3/dwc3-qcom.c
@@ -774,8 +774,8 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
qcom->qscratch_base = devm_ioremap_resource(dev, parent_res);
if (IS_ERR(qcom->qscratch_base)) {
- dev_err(dev, "failed to map qscratch, err=%d\n", ret);
ret = PTR_ERR(qcom->qscratch_base);
+ dev_err(dev, "failed to map qscratch, err=%d\n", ret);
goto clk_disable;
}
--
2.17.1
next reply other threads:[~2021-04-09 0:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-09 0:49 Bixuan Cui [this message]
2021-04-09 10:00 ` [PATCH] usb: dwc3: qcom: Fixed an issue that the ret value is incorrect in dwc3_qcom_probe() Manivannan Sadhasivam
2021-04-10 1:58 ` Bixuan Cui
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=20210409004945.56776-1-cuibixuan@huawei.com \
--to=cuibixuan@huawei.com \
--cc=agross@kernel.org \
--cc=balbi@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=john.wanghui@huawei.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mgautam@codeaurora.org \
/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;
as well as URLs for NNTP newsgroup(s).