diff options
author | Michael Grzeschik <m.grzeschik@pengutronix.de> | 2011-07-12 12:39:03 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-27 17:56:09 -0300 |
commit | 9c56cbf9aadff79c25ccd424ae422971efd5c1a4 (patch) | |
tree | 990af13815701f1e5f85d9626259d82410a9cd80 /drivers | |
parent | b52a851d9182e8a20704152d537c7e19ed34cc99 (diff) | |
download | op-kernel-dev-9c56cbf9aadff79c25ccd424ae422971efd5c1a4.zip op-kernel-dev-9c56cbf9aadff79c25ccd424ae422971efd5c1a4.tar.gz |
[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')
-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 cbccc86..8d8420a 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, |