Skip to content

Commit

Permalink
media: i2c: ov5648: fix wrong pointer passed to IS_ERR() and PTR_ERR()
Browse files Browse the repository at this point in the history
[ Upstream commit a6dd526 ]

IS_ERR() and PTR_ERR() use wrong pointer, it should be
sensor->dovdd, fix it.

Fixes: e43ccb0 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Yang Yingliang authored and gregkh committed Jun 9, 2022
1 parent 6978fa4 commit 424c087
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/media/i2c/ov5648.c
Expand Up @@ -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;
}

Expand Down

0 comments on commit 424c087

Please sign in to comment.