usb: dwc3: qcom: Fixed an issue that the ret value is incorrect in dwc3_qcom_probe()
Subsystems (3)
PATCH 1/1 usb: dwc3: qcom: Fixed an issue that the ret value is incorrect in dwc3_qcom_probe()
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.
--- drivers/usb/dwc3/dwc3-qcom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/dwc3/dwc3-qcom.c +1 -1
@@ -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; }
Signature · 1 line
2.17.1
Quoted 17 lines · Bixuan Cui
There is a error message after
devm_ioremap_resourcefailed, and the ret is needs to be obtained throughPTR_ERR(qcom->qscratch_base). We need to move thedev_err()downwards to ensure that the ret value is correct.Fixes a4333c3a6ba9 ('usb: dwc3: Add Qualcomm DWC3 glue driver')Reported-by Hulk Robot <[email protected]>Signed-off-by Bixuan Cui <[email protected]>--- drivers/usb/dwc3/dwc3-qcom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/usb/dwc3/dwc3-qcom.c +0
-0
drivers/usb/dwc3/dwc3-qcom.c static int dwc3_qcom_probe(struct platform_device *pdev) · line 778
Quoted 6 lines
drivers/usb/dwc3/dwc3-qcom.c +1
-1@@ -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);
But this error message can be removed altogether as devm_ioremap_resource() reports it already.
Thanks,
Mani
Quoted 6 lines
drivers/usb/dwc3/dwc3-qcom.c +0
-0goto clk_disable; }Signature · 1 line
2.17.1
Quoted 2 lines · Manivannan Sadhasivam
But this error message can be removed altogether as
devm_ioremap_resource()reports it already.
Thank you for your reply. I'll revise it.
Thanks,
Bixuan Cui