mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Benjamin Mugnier <benjamin.mugnier@foss.st.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
	Sylvain Petinot <sylvain.petinot@foss.st.com>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Julien Massot <julien.massot@collabora.com>
Cc: <linux-kernel@vger.kernel.org>, <kernel-janitors@vger.kernel.org>,
	<linux-media@vger.kernel.org>
Subject: Re: [PATCH] media: i2c: vgxy61: Fix an error handling path in vgxy61_detect()
Date: Mon, 7 Oct 2024 14:36:57 +0200	[thread overview]
Message-ID: <c00e8977-ee68-489f-89b1-5ba78bb238df@foss.st.com> (raw)
In-Reply-To: <666ac169157f0af1c2e1d47926b68870cb39d587.1727977974.git.christophe.jaillet@wanadoo.fr>

Hi Christophe,

Thank you for your patch.

On 10/3/24 19:53, Christophe JAILLET wrote:
> If cci_read() fails, 'st' is set to 0 in cci_read(), so we return success,
> instead of the expected error code.
> 
> Fix it and return the expected error.
> 
> Fixes: 9a6d7f2ba2b9 ("media: i2c: st-vgxy61: Convert to CCI register access helpers")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Reviewed-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com>

> ---
>  drivers/media/i2c/vgxy61.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/i2c/vgxy61.c b/drivers/media/i2c/vgxy61.c
> index 30378e962016..8034e21051be 100644
> --- a/drivers/media/i2c/vgxy61.c
> +++ b/drivers/media/i2c/vgxy61.c
> @@ -1617,7 +1617,7 @@ static int vgxy61_detect(struct vgxy61_dev *sensor)
>  
>  	ret = cci_read(sensor->regmap, VGXY61_REG_NVM, &st, NULL);
>  	if (ret < 0)
> -		return st;
> +		return ret;
>  	if (st != VGXY61_NVM_OK)
>  		dev_warn(&client->dev, "Bad nvm state got %u\n", (u8)st);
>  

-- 
Regards,

Benjamin

      reply	other threads:[~2024-10-07 12:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-03 17:53 Christophe JAILLET
2024-10-07 12:36 ` Benjamin Mugnier [this message]

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=c00e8977-ee68-489f-89b1-5ba78bb238df@foss.st.com \
    --to=benjamin.mugnier@foss.st.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=julien.massot@collabora.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=sylvain.petinot@foss.st.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

all inboxes | Powered by JetHome®