public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: typec-mux: ptn36502: Omit a variable reassignment in ptn36502_probe()
@ 2025-10-20 16:00 Markus Elfring
  2025-10-21 10:09 ` Heikki Krogerus
  0 siblings, 1 reply; 2+ messages in thread
From: Markus Elfring @ 2025-10-20 16:00 UTC (permalink / raw)
  To: linux-usb, Dmitry Baryshkov, Greg Kroah-Hartman, Heikki Krogerus,
	Neil Armstrong
  Cc: kernel-janitors, LKML, Anand Moon, Christophe Jaillet

From: Markus Elfring <elfring@users.sourceforge.net>
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.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/usb/typec/mux/ptn36502.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/typec/mux/ptn36502.c b/drivers/usb/typec/mux/ptn36502.c
index 129d9d24b932..b1a2977b974c 100644
--- a/drivers/usb/typec/mux/ptn36502.c
+++ b/drivers/usb/typec/mux/ptn36502.c
@@ -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;
 	}
 
-- 
2.51.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-10-21 10:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-20 16:00 [PATCH] usb: typec-mux: ptn36502: Omit a variable reassignment in ptn36502_probe() Markus Elfring
2025-10-21 10:09 ` Heikki Krogerus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox