aboutsummaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorMichael Grzeschik <m.grzeschik@pengutronix.de>2011-07-12 12:39:03 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-07-27 17:56:09 -0300
commit9c56cbf9aadff79c25ccd424ae422971efd5c1a4 (patch)
tree990af13815701f1e5f85d9626259d82410a9cd80 /drivers/media
parentb52a851d9182e8a20704152d537c7e19ed34cc99 (diff)
[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')
-rw-r--r--drivers/media/video/mt9m111.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/video/mt9m111.c b/drivers/media/video/mt9m111.c
index cbccc869c7e..8d8420acc9c 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,