From: Crt Mori <cmo@melexis.com>
To: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Cc: Jonathan Cameron <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
dan.carpenter@linaro.org, kernel-janitors@vger.kernel.org,
error27@gmail.com
Subject: Re: [PATCH] iio: temperature: mlx90635: Fix ERR_PTR dereference in mlx90635_probe()
Date: Mon, 13 May 2024 22:02:26 +0200 [thread overview]
Message-ID: <CAKv63uvAe=RkZ6ytWfNkM5exy5ys5n2NwcJER=VMVAP+61-+rw@mail.gmail.com> (raw)
In-Reply-To: <20240513184514.3200222-1-harshit.m.mogalapalli@oracle.com>
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@melexis.com>
On Mon, 13 May 2024 at 20:47, Harshit Mogalapalli
<harshit.m.mogalapalli@oracle.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@oracle.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
>
next prev parent reply other threads:[~2024-05-13 20:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-13 18:45 [PATCH] iio: temperature: mlx90635: Fix ERR_PTR dereference in mlx90635_probe() Harshit Mogalapalli
2024-05-13 20:02 ` Crt Mori [this message]
2024-05-13 20:12 ` Harshit Mogalapalli
2024-05-13 20:26 ` Crt Mori
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='CAKv63uvAe=RkZ6ytWfNkM5exy5ys5n2NwcJER=VMVAP+61-+rw@mail.gmail.com' \
--to=cmo@melexis.com \
--cc=dan.carpenter@linaro.org \
--cc=error27@gmail.com \
--cc=harshit.m.mogalapalli@oracle.com \
--cc=jic23@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).