lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c00e8977-ee68-489f-89b1-5ba78bb238df@foss.st.com>
Date: Mon, 7 Oct 2024 14:36:57 +0200
From: Benjamin Mugnier <benjamin.mugnier@...s.st.com>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        Sylvain Petinot
	<sylvain.petinot@...s.st.com>,
        Sakari Ailus <sakari.ailus@...ux.intel.com>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Julien Massot
	<julien.massot@...labora.com>
CC: <linux-kernel@...r.kernel.org>, <kernel-janitors@...r.kernel.org>,
        <linux-media@...r.kernel.org>
Subject: Re: [PATCH] media: i2c: vgxy61: Fix an error handling path in
 vgxy61_detect()

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@...adoo.fr>

Reviewed-by: Benjamin Mugnier <benjamin.mugnier@...s.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ