usb: typec-mux: ptn36502: Omit a variable reassignment in ptn36502_probe()
Subsystems (3)
PATCH 1/1 usb: typec-mux: ptn36502: Omit a variable reassignment in ptn36502_probe()
From: Markus Elfring <[email protected]>
Date: Mon, 20 Oct 2025 17:50:12 +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/typec/mux/ptn36502.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/typec/mux/ptn36502.c +1 -1
@@ -339,7 +339,7 @@ static int ptn36502_probe(struct i2c_client *client) ret =regulator_enable (ptn->vdd18_supply);if (ret) { - ret =dev_err_probe (dev, ret,"Failed to enable vdd18\n" ); +dev_err_probe (dev, ret,"Failed to enable vdd18\n" ); goto err_mux_put; }
Signature · 1 line
2.51.1
Quoted 11 lines · Markus Elfring
From: Markus Elfring <[email protected]>
Date: Mon, 20 Oct 2025 17:50:12 +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]>
Quoted 19 lines
--- drivers/usb/typec/mux/ptn36502.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/usb/typec/mux/ptn36502.c +1
-1@@ -339,7 +339,7 @@ static int ptn36502_probe(struct i2c_client *client) ret =regulator_enable (ptn->vdd18_supply);if (ret) { - ret =dev_err_probe (dev, ret,"Failed to enable vdd18\n" ); +dev_err_probe (dev, ret,"Failed to enable vdd18\n" ); goto err_mux_put; }Signature · 1 line
2.51.1
Signature · 1 line
heikki