Linux Media Controller development
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: "Paul J. Murphy" <paul.j.murphy@intel.com>,
	Martina Krasteva <martinax.krasteva@intel.com>
Cc: Daniele Alessandrelli <daniele.alessandrelli@intel.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Jacopo Mondi <jacopo@jmondi.org>,
	Gjorgji Rosikopulos <gjorgjix.rosikopulos@intel.com>,
	linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH] media: i2c: imx334: Fix an error message
Date: Tue, 9 Feb 2021 14:04:48 +0300	[thread overview]
Message-ID: <YCJsUCngklBkJMgw@mwanda> (raw)

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


             reply	other threads:[~2021-02-09 11:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-09 11:04 Dan Carpenter [this message]
2021-02-09 12:08 ` [PATCH] media: i2c: imx334: Fix an error message Sakari Ailus
2021-02-09 13:49   ` Dan Carpenter
2021-02-09 13:58     ` Sakari Ailus

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=YCJsUCngklBkJMgw@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=daniele.alessandrelli@intel.com \
    --cc=gjorgjix.rosikopulos@intel.com \
    --cc=jacopo@jmondi.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=martinax.krasteva@intel.com \
    --cc=mchehab@kernel.org \
    --cc=paul.j.murphy@intel.com \
    --cc=sakari.ailus@linux.intel.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