Linux Media Controller development
 help / color / mirror / Atom feed
* [PATCH] media: i2c: imx334: Fix an error message
@ 2021-02-09 11:04 Dan Carpenter
  2021-02-09 12:08 ` Sakari Ailus
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2021-02-09 11:04 UTC (permalink / raw)
  To: Paul J. Murphy, Martina Krasteva
  Cc: Daniele Alessandrelli, Mauro Carvalho Chehab, Sakari Ailus,
	Jacopo Mondi, Gjorgji Rosikopulos, linux-media, kernel-janitors

The "ret" variable is uninitialized in this error message.

Fixes: 9746b11715c3 ("media: i2c: Add imx334 camera sensor driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
When new drivers are merged into the kernel, then could we use the
driver prefix?  In other words something like this:

media: i2c/imx334: Add imx334 camera sensor driver

 drivers/media/i2c/imx334.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/media/i2c/imx334.c b/drivers/media/i2c/imx334.c
index 07e31bc2ef18..7fbea7caef42 100644
--- a/drivers/media/i2c/imx334.c
+++ b/drivers/media/i2c/imx334.c
@@ -790,8 +790,9 @@ static int imx334_parse_hw_config(struct imx334 *imx334)
 	imx334->reset_gpio = devm_gpiod_get_optional(imx334->dev, "reset",
 						     GPIOD_OUT_LOW);
 	if (IS_ERR(imx334->reset_gpio)) {
+		ret = PTR_ERR(imx334->reset_gpio);
 		dev_err(imx334->dev, "failed to get reset gpio %d", ret);
-		return PTR_ERR(imx334->reset_gpio);
+		return ret;
 	}
 
 	/* Get sensor input clock */
-- 
2.30.0


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

end of thread, other threads:[~2021-02-09 14:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-09 11:04 [PATCH] media: i2c: imx334: Fix an error message Dan Carpenter
2021-02-09 12:08 ` Sakari Ailus
2021-02-09 13:49   ` Dan Carpenter
2021-02-09 13:58     ` Sakari Ailus

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