i2c: designware: Omit a variable reassignment in dw_i2c_plat_probe()
Subsystems (3)
PATCH 1/1 i2c: designware: Omit a variable reassignment in dw_i2c_plat_probe()
From: Markus Elfring <[email protected]>
Date: Mon, 20 Oct 2025 12:56:39 +0200
Subject: [PATCH] i2c: designware: Omit a variable reassignment in dw_i2c_plat_probe()
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/i2c/busses/i2c-designware-platdrv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-designware-platdrv.c +1 -1
@@ -248,7 +248,7 @@ static int dw_i2c_plat_probe(struct platform_device *pdev) ret =i2c_dw_probe_lock_support (dev);if (ret) { - ret =dev_err_probe (device, ret,"failed to probe lock support\n" ); +dev_err_probe (device, ret,"failed to probe lock support\n" ); goto exit_reset; }
Signature · 1 line
2.51.1
Quoted 4 lines · Markus Elfring
From: Markus Elfring <[email protected]>
Date: Mon, 20 Oct 2025 12:56:39 +0200
Subject: [PATCH] i2c: designware: Omit a variable reassignment indw_i2c_plat_probe()
Quoted 8 lines
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 <[email protected]>
Hi Markus
Quoted 5 lines · Markus Elfring
From: Markus Elfring <[email protected]>
Date: Mon, 20 Oct 2025 12:56:39 +0200
Subject: [PATCH] i2c: designware: Omit a variable reassignment indw_i2c_plat_probe()
Quoted 8 lines
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 <[email protected]>
Thanks
-Anand
Hi Markus,
Quoted 8 lines
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 <[email protected]>
merged to i2c/i2c-host.
Thanks,
Andi