From: Erik Andrén Date: Tue, 23 Jun 2009 15:22:48 +0000 (-0300) Subject: V4L/DVB (12221): gspca - stv06xx-hdcs: Actually update the sensor state X-Git-Tag: 2.1b_release~11835^2~33 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=36a516d953e02523e78ce27fbff91a968a9e5751;p=platform%2Fkernel%2Fkernel-mfld-blackbay.git V4L/DVB (12221): gspca - stv06xx-hdcs: Actually update the sensor state Signed-off-by: Erik Andrén Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c b/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c index 3039ec2..ec7f553 100644 --- a/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c +++ b/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c @@ -174,7 +174,9 @@ static int hdcs_set_state(struct sd *sd, enum hdcs_power_state state) } ret = stv06xx_write_sensor(sd, HDCS_REG_CONTROL(sd), val); - if (ret < 0) + + /* Update the state if the write succeeded */ + if (!ret) hdcs->state = state; return ret;