From: Markus Elfring <Markus.Elfring@web.de>
To: linux-usb@vger.kernel.org,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Neil Armstrong <neil.armstrong@linaro.org>
Cc: kernel-janitors@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>,
Anand Moon <linux.amoon@gmail.com>,
Christophe Jaillet <christophe.jaillet@wanadoo.fr>
Subject: [PATCH] usb: typec-mux: ptn36502: Omit a variable reassignment in ptn36502_probe()
Date: Mon, 20 Oct 2025 18:00:06 +0200 [thread overview]
Message-ID: <b33ac7ab-e66f-4407-ba3e-ec4c70636fcf@web.de> (raw)
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
next reply other threads:[~2025-10-20 16:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-20 16:00 Markus Elfring [this message]
2025-10-21 10:09 ` [PATCH] usb: typec-mux: ptn36502: Omit a variable reassignment in ptn36502_probe() Heikki Krogerus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b33ac7ab-e66f-4407-ba3e-ec4c70636fcf@web.de \
--to=markus.elfring@web.de \
--cc=christophe.jaillet@wanadoo.fr \
--cc=dmitry.baryshkov@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux.amoon@gmail.com \
--cc=neil.armstrong@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox