* [PATCH] usb: dwc3: qcom: Omit a variable reassignment in dwc3_qcom_probe()
@ 2025-10-20 15:33 Markus Elfring
2025-10-21 22:18 ` Thinh Nguyen
0 siblings, 1 reply; 2+ messages in thread
From: Markus Elfring @ 2025-10-20 15:33 UTC (permalink / raw)
To: linux-usb, linux-arm-msm, Bjorn Andersson, Greg Kroah-Hartman,
Neil Armstrong, Thinh Nguyen
Cc: kernel-janitors, LKML, Anand Moon, Christophe Jaillet
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 20 Oct 2025 17:17:18 +0200
An error code was assigned to a variable and checked accordingly.
This value was passed to a dev_err_probe() call in an if branch.
This function is documented in the way that the same value is returned.
Thus delete a redundant variable reassignment.
The source code was transformed by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
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 ded2ca86670c..e81011ef130e 100644
--- a/drivers/usb/dwc3/dwc3-qcom.c
+++ b/drivers/usb/dwc3/dwc3-qcom.c
@@ -707,6 +707,6 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
ret = dwc3_core_probe(&probe_data);
if (ret) {
- ret = dev_err_probe(dev, ret, "failed to register DWC3 Core\n");
+ dev_err_probe(dev, ret, "failed to register DWC3 Core\n");
goto clk_disable;
}
--
2.51.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] usb: dwc3: qcom: Omit a variable reassignment in dwc3_qcom_probe()
2025-10-20 15:33 [PATCH] usb: dwc3: qcom: Omit a variable reassignment in dwc3_qcom_probe() Markus Elfring
@ 2025-10-21 22:18 ` Thinh Nguyen
0 siblings, 0 replies; 2+ messages in thread
From: Thinh Nguyen @ 2025-10-21 22:18 UTC (permalink / raw)
To: Markus Elfring
Cc: linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org,
Bjorn Andersson, Greg Kroah-Hartman, Neil Armstrong, Thinh Nguyen,
kernel-janitors@vger.kernel.org, LKML, Anand Moon,
Christophe Jaillet
On Mon, Oct 20, 2025, Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Mon, 20 Oct 2025 17:17:18 +0200
>
> An error code was assigned to a variable and checked accordingly.
> This value was passed to a dev_err_probe() call in an if branch.
> This function is documented in the way that the same value is returned.
> Thus delete a redundant variable reassignment.
>
> The source code was transformed by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
> 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 ded2ca86670c..e81011ef130e 100644
> --- a/drivers/usb/dwc3/dwc3-qcom.c
> +++ b/drivers/usb/dwc3/dwc3-qcom.c
> @@ -707,6 +707,6 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
> ret = dwc3_core_probe(&probe_data);
> if (ret) {
> - ret = dev_err_probe(dev, ret, "failed to register DWC3 Core\n");
> + dev_err_probe(dev, ret, "failed to register DWC3 Core\n");
> goto clk_disable;
> }
>
> --
> 2.51.1
>
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
BR,
Thinh
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-10-21 22:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-20 15:33 [PATCH] usb: dwc3: qcom: Omit a variable reassignment in dwc3_qcom_probe() Markus Elfring
2025-10-21 22:18 ` Thinh Nguyen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox