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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 13 May 2024 22:02:26 +0200
From: Crt Mori <cmo@...exis.com>
To: Harshit Mogalapalli <harshit.m.mogalapalli@...cle.com>
Cc: Jonathan Cameron <jic23@...nel.org>, Lars-Peter Clausen <lars@...afoo.de>, linux-iio@...r.kernel.org, 
	linux-kernel@...r.kernel.org, dan.carpenter@...aro.org, 
	kernel-janitors@...r.kernel.org, error27@...il.com
Subject: Re: [PATCH] iio: temperature: mlx90635: Fix ERR_PTR dereference in mlx90635_probe()

Hi,
I agree it is is copy-paste error. Minor remark below and a few typo
fixes in commit message. Thanks for your contribution.

Reviewed-by: Crt Mori<cmo@...exis.com>

On Mon, 13 May 2024 at 20:47, Harshit Mogalapalli
<harshit.m.mogalapalli@...cle.com> wrote:
>
> When devm_regmap_init_i2c() fails, ragmap_ee could be error pointer,
When devm_regmap_init_i2c() fails, regmap_ee could be error pointer,

> instead of checking for IS_ERR(ragmap_ee), regmap is checked which looks
instead of checking for IS_ERR(regmap_ee), regmap is checked which looks
> like a copy paste error.
>
> Fixes: a1d1ba5e1c28 ("iio: temperature: mlx90635 MLX90635 IR Temperature sensor")
> Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@...cle.com>
> ---
> This is found using smatch, only compile tested.
> ---
>  drivers/iio/temperature/mlx90635.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/iio/temperature/mlx90635.c b/drivers/iio/temperature/mlx90635.c
> index 1f5c962c1818..2b61489d5ee0 100644
> --- a/drivers/iio/temperature/mlx90635.c
> +++ b/drivers/iio/temperature/mlx90635.c
> @@ -947,8 +947,8 @@ static int mlx90635_probe(struct i2c_client *client)
>                                      "failed to allocate regmap\n");
>
>         regmap_ee = devm_regmap_init_i2c(client, &mlx90635_regmap_ee);
> -       if (IS_ERR(regmap))
> -               return dev_err_probe(&client->dev, PTR_ERR(regmap),
> +       if (IS_ERR(regmap_ee))
> +               return dev_err_probe(&client->dev, PTR_ERR(regmap_ee),
>                                      "failed to allocate regmap\n");

Maybe fix her would also be to this regmap error message to include
regmap EEPROM?

>
>         mlx90635 = iio_priv(indio_dev);
> --
> 2.39.3
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ