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-Url: https://git.stricted.de/?a=commitdiff_plain;h=36a516d953e02523e78ce27fbff91a968a9e5751;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.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 3039ec208f3a..ec7f5536a8ad 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;