diff mbox series

[-next] media: i2c: ov5648: fix wrong pointer passed to IS_ERR() and PTR_ERR()

Message ID 20210330130446.1053644-1-yangyingliang@huawei.com (mailing list archive)
State New, archived
Headers show
Series [-next] media: i2c: ov5648: fix wrong pointer passed to IS_ERR() and PTR_ERR() | expand

Commit Message

Yang Yingliang March 30, 2021, 1:04 p.m. UTC
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(-)

Comments

Yang Yingliang May 17, 2021, 11:40 a.m. UTC | #1
ping...

On 2021/3/30 21:04, Yang Yingliang wrote:
> 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 dfe38ab8224d..db6f626f92fb 100644
> --- a/drivers/media/i2c/ov5648.c
> +++ b/drivers/media/i2c/ov5648.c
> @@ -2494,9 +2494,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;
>   	}
>
diff mbox series

Patch

diff --git a/drivers/media/i2c/ov5648.c b/drivers/media/i2c/ov5648.c
index dfe38ab8224d..db6f626f92fb 100644
--- a/drivers/media/i2c/ov5648.c
+++ b/drivers/media/i2c/ov5648.c
@@ -2494,9 +2494,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;
 	}