usb: dwc3: qcom: Omit a variable reassignment in dwc3_qcom_probe()
PATCH 1/1 usb: dwc3: qcom: Omit a variable reassignment in dwc3_qcom_probe()
From: Markus Elfring <[email protected]>
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.
--- drivers/usb/dwc3/dwc3-qcom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/dwc3/dwc3-qcom.c +1 -1
@@ -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; }
Signature · 1 line
2.51.1
Quoted 30 lines · Markus Elfring
From: Markus Elfring <[email protected]>
Date: Mon, 20 Oct 2025 17:17:18 +0200An 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 <[email protected]>--- drivers/usb/dwc3/dwc3-qcom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/usb/dwc3/dwc3-qcom.c +1
-1@@ -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; }Signature · 1 line
2.51.1
BR,
Thinh