diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2016-11-18 15:49:15 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-01-30 14:46:44 -0200 |
commit | a5bc63f28a384e2961dcd9069d71ccded8406ce6 (patch) | |
tree | 2e9d11661e903f07fa811c7434fe7253eedbf112 /drivers/media/i2c | |
parent | f41003a23a02dc7299539300f74360c2a932714a (diff) |
[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: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r-- | drivers/media/i2c/soc_camera/ov9640.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/i2c/soc_camera/ov9640.c b/drivers/media/i2c/soc_camera/ov9640.c index 8c93c57af71c..65085a235128 100644 --- a/drivers/media/i2c/soc_camera/ov9640.c +++ b/drivers/media/i2c/soc_camera/ov9640.c @@ -233,7 +233,7 @@ static int ov9640_reg_rmw(struct i2c_client *client, u8 reg, u8 set, u8 unset) if (ret) { dev_err(&client->dev, "[Read]-Modify-Write of register %02x failed!\n", reg); - return val; + return ret; } val |= set; |