* [PATCH] media: i2c: imx290: Omit a variable reassignment in imx290_probe()
@ 2025-10-20 12:18 Markus Elfring
0 siblings, 0 replies; only message in thread
From: Markus Elfring @ 2025-10-20 12:18 UTC (permalink / raw)
To: linux-media, Benjamin Bara, Manivannan Sadhasivam,
Mauro Carvalho Chehab, Sakari Ailus
Cc: LKML, Anand Moon, Christophe Jaillet
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 20 Oct 2025 14:10:20 +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/media/i2c/imx290.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/i2c/imx290.c b/drivers/media/i2c/imx290.c
index 21cbc81cb2ed..9623a9c21c9d 100644
--- a/drivers/media/i2c/imx290.c
+++ b/drivers/media/i2c/imx290.c
@@ -1633,7 +1633,7 @@ static int imx290_probe(struct i2c_client *client)
*/
ret = imx290_stop_streaming(imx290);
if (ret) {
- ret = dev_err_probe(dev, ret, "Could not initialize device\n");
+ dev_err_probe(dev, ret, "Could not initialize device\n");
goto err_pm;
}
--
2.51.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-10-20 12:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-20 12:18 [PATCH] media: i2c: imx290: Omit a variable reassignment in imx290_probe() Markus Elfring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®