summaryrefslogtreecommitdiff
path: root/drivers/media/i2c/ov8865.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2021-01-20 11:42:38 +0300
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-01-27 10:33:30 +0300
commit6e7cca2790a54057ddf64da7843271e192f71ca0 (patch)
treeea2c70837b3eaa1d721745f00f18ff59129317d1 /drivers/media/i2c/ov8865.c
parentfec9b0e8491649386559dc154c113f569f908e6e (diff)
downloadlinux-6e7cca2790a54057ddf64da7843271e192f71ca0.tar.xz
media: i2c/ov8865.c: fix error checks using wrong variable
Fix two typos: dvdd -> dovdd and dvdd -> avdd Both clearly copy-and-paste mistakes. Fixes this smatch warning: drivers/media/i2c/ov8865.c:2852 ov8865_probe() warn: passing zero to 'PTR_ERR' Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/i2c/ov8865.c')
-rw-r--r--drivers/media/i2c/ov8865.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/i2c/ov8865.c b/drivers/media/i2c/ov8865.c
index ab4804d5b285..b2099e38d0af 100644
--- a/drivers/media/i2c/ov8865.c
+++ b/drivers/media/i2c/ov8865.c
@@ -2839,9 +2839,9 @@ static int ov8865_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;
}
@@ -2849,7 +2849,7 @@ static int ov8865_probe(struct i2c_client *client)
sensor->avdd = devm_regulator_get(dev, "avdd");
if (IS_ERR(sensor->avdd)) {
dev_err(dev, "cannot get AVDD (analog) regulator\n");
- ret = PTR_ERR(sensor->dvdd);
+ ret = PTR_ERR(sensor->avdd);
goto error_endpoint;
}