提交 a5bc63f2 编写于 作者: C Christophe JAILLET 提交者: Mauro Carvalho Chehab

[media] soc-camera: Fix a return value in case of error

If 'ov9640_reg_read()' does not return 0, then 'val' is left unmodified.
As it is not initialized either, the return value can be anything.

It is likely that returning the error code was expected here.
Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: NGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 f41003a2
...@@ -233,7 +233,7 @@ static int ov9640_reg_rmw(struct i2c_client *client, u8 reg, u8 set, u8 unset) ...@@ -233,7 +233,7 @@ static int ov9640_reg_rmw(struct i2c_client *client, u8 reg, u8 set, u8 unset)
if (ret) { if (ret) {
dev_err(&client->dev, dev_err(&client->dev,
"[Read]-Modify-Write of register %02x failed!\n", reg); "[Read]-Modify-Write of register %02x failed!\n", reg);
return val; return ret;
} }
val |= set; val |= set;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册