]> git.baikalelectronics.ru Git - kernel.git/commitdiff
media: i2c: ov5648: fix wrong pointer passed to IS_ERR() and PTR_ERR()
authorYang Yingliang <yangyingliang@huawei.com>
Tue, 30 Mar 2021 13:04:46 +0000 (15:04 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Tue, 17 May 2022 07:18:30 +0000 (09:18 +0200)
IS_ERR() and PTR_ERR() use wrong pointer, it should be
sensor->dovdd, fix it.

Fixes: c6372971ea8d ("media: i2c: Add support for the OV5648 image sensor")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/i2c/ov5648.c

index 930ff6897044a46ba812a4bed0fcd32aea1f5ac9..dfcd33e9ee136c98d8373b35ed06e0a389802f42 100644 (file)
@@ -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;
        }