From: Markus Elfring <Markus.Elfring@web.de>
To: linux-i2c@vger.kernel.org, "Andi Shyti" <andi.shyti@kernel.org>,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Benoît Monin" <benoit.monin@bootlin.com>,
"Jan Dabros" <jsd@semihalf.com>,
"Jarkko Nikula" <jarkko.nikula@linux.intel.com>,
"Mika Westerberg" <mika.westerberg@linux.intel.com>,
"Wolfram Sang" <wsa+renesas@sang-engineering.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Anand Moon <linux.amoon@gmail.com>,
Christophe Jaillet <christophe.jaillet@wanadoo.fr>
Subject: [PATCH] i2c: designware: Omit a variable reassignment in dw_i2c_plat_probe()
Date: Mon, 20 Oct 2025 13:08:53 +0200 [thread overview]
Message-ID: <bec52694-c755-4d88-aa36-1d96f6d146e4@web.de> (raw)
From: Markus Elfring <elfring@users.sourceforge.net>
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.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/i2c/busses/i2c-designware-platdrv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
index 34d881572351..c69ef8da22ab 100644
--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
@@ -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;
}
--
2.51.1
next reply other threads:[~2025-10-20 11:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-20 11:08 Markus Elfring [this message]
2025-10-20 13:06 ` [PATCH] i2c: designware: Omit a variable reassignment in dw_i2c_plat_probe() Mika Westerberg
2025-10-20 13:12 ` Anand Moon
2025-10-21 22:50 ` Andi Shyti
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=bec52694-c755-4d88-aa36-1d96f6d146e4@web.de \
--to=markus.elfring@web.de \
--cc=andi.shyti@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=benoit.monin@bootlin.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=jarkko.nikula@linux.intel.com \
--cc=jsd@semihalf.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux.amoon@gmail.com \
--cc=mika.westerberg@linux.intel.com \
--cc=wsa+renesas@sang-engineering.com \
/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