From: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
To: Yang Yingliang <yangyingliang@huawei.com>
Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
mchehab@kernel.org
Subject: Re: [PATCH resend] media: i2c: ov5648: fix wrong pointer passed to IS_ERR() and PTR_ERR()
Date: Mon, 21 Mar 2022 09:39:26 +0100 [thread overview]
Message-ID: <Yjg5vl1prcd6y0rT@aptenodytes> (raw)
In-Reply-To: <20220319035806.3299264-1-yangyingliang@huawei.com>
[-- Attachment #1: Type: text/plain, Size: 1258 bytes --]
Hi Yang,
On Sat 19 Mar 22, 11:58, Yang Yingliang wrote:
> IS_ERR() and PTR_ERR() use wrong pointer, it should be
> sensor->dovdd, fix it.
Nice catch, thank-you!
Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Cheers,
Paul
> Fixes: e43ccb0a045f ("media: i2c: Add support for the OV5648 image sensor")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
> drivers/media/i2c/ov5648.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/i2c/ov5648.c b/drivers/media/i2c/ov5648.c
> index 930ff6897044..dfcd33e9ee13 100644
> --- a/drivers/media/i2c/ov5648.c
> +++ b/drivers/media/i2c/ov5648.c
> @@ -2498,9 +2498,9 @@ static int ov5648_probe(struct i2c_client *client)
>
> /* DOVDD: digital I/O */
> sensor->dovdd = devm_regulator_get(dev, "dovdd");
> - if (IS_ERR(sensor->dvdd)) {
> + if (IS_ERR(sensor->dovdd)) {
> dev_err(dev, "cannot get DOVDD (digital I/O) regulator\n");
> - ret = PTR_ERR(sensor->dvdd);
> + ret = PTR_ERR(sensor->dovdd);
> goto error_endpoint;
> }
>
> --
> 2.25.1
>
--
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2022-03-21 8:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-19 3:58 [PATCH resend] media: i2c: ov5648: fix wrong pointer passed to IS_ERR() and PTR_ERR() Yang Yingliang
2022-03-21 8:39 ` Paul Kocialkowski [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=Yjg5vl1prcd6y0rT@aptenodytes \
--to=paul.kocialkowski@bootlin.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=yangyingliang@huawei.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