* [PATCH resend] media: i2c: ov5648: fix wrong pointer passed to IS_ERR() and PTR_ERR()
@ 2022-03-19 3:58 Yang Yingliang
2022-03-21 8:39 ` Paul Kocialkowski
0 siblings, 1 reply; 2+ messages in thread
From: Yang Yingliang @ 2022-03-19 3:58 UTC (permalink / raw)
To: linux-kernel, linux-media; +Cc: paul.kocialkowski, mchehab
IS_ERR() and PTR_ERR() use wrong pointer, it should be
sensor->dovdd, fix it.
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH resend] media: i2c: ov5648: fix wrong pointer passed to IS_ERR() and PTR_ERR()
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
0 siblings, 0 replies; 2+ messages in thread
From: Paul Kocialkowski @ 2022-03-21 8:39 UTC (permalink / raw)
To: Yang Yingliang; +Cc: linux-kernel, linux-media, mchehab
[-- 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 --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-21 8:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox