media: ov9650: fix bogus warnings
The smatch logic gets confused with the syntax used to check if the ov9650x_read() reads succedded: drivers/media/i2c/ov9650.c:895 __g_volatile_ctrl() error: uninitialized symbol 'reg2'. drivers/media/i2c/ov9650.c:895 __g_volatile_ctrl() error: uninitialized symbol 'reg1'. There's nothing wrong with the original logic, except that it is a little more harder to review. So, let's stick with the syntax that won't cause read issues. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Reviewed-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
Родитель
f303810cf1
Коммит
29236349aa
|
@ -886,10 +886,12 @@ static int __g_volatile_ctrl(struct ov965x *ov965x, struct v4l2_ctrl *ctrl)
|
||||||
if (ctrl->val == V4L2_EXPOSURE_MANUAL)
|
if (ctrl->val == V4L2_EXPOSURE_MANUAL)
|
||||||
return 0;
|
return 0;
|
||||||
ret = ov965x_read(client, REG_COM1, ®0);
|
ret = ov965x_read(client, REG_COM1, ®0);
|
||||||
if (!ret)
|
if (ret < 0)
|
||||||
ret = ov965x_read(client, REG_AECH, ®1);
|
return ret;
|
||||||
if (!ret)
|
ret = ov965x_read(client, REG_AECH, ®1);
|
||||||
ret = ov965x_read(client, REG_AECHM, ®2);
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
ret = ov965x_read(client, REG_AECHM, ®2);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
exposure = ((reg2 & 0x3f) << 10) | (reg1 << 2) |
|
exposure = ((reg2 & 0x3f) << 10) | (reg1 << 2) |
|
||||||
|
|
Загрузка…
Ссылка в новой задаче