提交 d487df9e 编写于 作者: M Mauro Carvalho Chehab

[media] ov7670: check read error also for REG_AECHH on ov7670_s_exp()

ov7670_s_exp() checks read error for 2 registers: REG_COM1
and REG_COM8. But, although it uses the value latter, it
doesn't check errors on REG_AECHH read. Yet, as it is doing
a bitmask operation there, the read operation should succeed.

So, fix the code to also check if this succeeded.

This fixes this smatch report:
	drivers/media/i2c/ov7670.c:1366 ov7670_s_exp() warn: inconsistent indenting

Compile-tested only.
Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: NJonathan Corbet <corbet@lwn.net>
Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
上级 5e6b681b
...@@ -1362,7 +1362,7 @@ static int ov7670_s_exp(struct v4l2_subdev *sd, int value) ...@@ -1362,7 +1362,7 @@ static int ov7670_s_exp(struct v4l2_subdev *sd, int value)
unsigned char com1, com8, aech, aechh; unsigned char com1, com8, aech, aechh;
ret = ov7670_read(sd, REG_COM1, &com1) + ret = ov7670_read(sd, REG_COM1, &com1) +
ov7670_read(sd, REG_COM8, &com8); ov7670_read(sd, REG_COM8, &com8) +
ov7670_read(sd, REG_AECHH, &aechh); ov7670_read(sd, REG_AECHH, &aechh);
if (ret) if (ret)
return ret; return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册