diff options
author | Michael Grzeschik <m.grzeschik@pengutronix.de> | 2011-07-12 17:39:03 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-27 22:56:09 +0200 |
commit | 9c56cbf9aadff79c25ccd424ae422971efd5c1a4 (patch) | |
tree | 990af13815701f1e5f85d9626259d82410a9cd80 /drivers/media/video/mt9m111.c | |
parent | [media] V4L: initial driver for ov5642 CMOS sensor (diff) | |
download | linux-9c56cbf9aadff79c25ccd424ae422971efd5c1a4.tar.xz linux-9c56cbf9aadff79c25ccd424ae422971efd5c1a4.zip |
[media] V4L: mt9m111: fix missing return value check mt9m111_reg_clear
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/mt9m111.c')
-rw-r--r-- | drivers/media/video/mt9m111.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/video/mt9m111.c b/drivers/media/video/mt9m111.c index cbccc869c7e1..8d8420acc9cf 100644 --- a/drivers/media/video/mt9m111.c +++ b/drivers/media/video/mt9m111.c @@ -250,7 +250,9 @@ static int mt9m111_reg_clear(struct i2c_client *client, const u16 reg, int ret; ret = mt9m111_reg_read(client, reg); - return mt9m111_reg_write(client, reg, ret & ~data); + if (ret >= 0) + ret = mt9m111_reg_write(client, reg, ret & ~data); + return ret; } static int mt9m111_set_context(struct mt9m111 *mt9m111, |