Skip to content

Commit

Permalink
[media] V4L: mt9m111: fix missing return value check mt9m111_reg_clear
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael Grzeschik authored and Mauro Carvalho Chehab committed Jul 27, 2011
1 parent b52a851 commit 9c56cbf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/media/video/mt9m111.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 9c56cbf

Please sign in to comment.