aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video/gspca
diff options
context:
space:
mode:
authorErik Andrén <erik.andren@gmail.com>2009-06-23 12:22:48 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-07-24 14:03:21 -0300
commit36a516d953e02523e78ce27fbff91a968a9e5751 (patch)
tree85ffcca38a9492d144068e008f4d622a608bfe5e /drivers/media/video/gspca
parent4be3bd7849165e7efa6b0b35a23d6a3598d97465 (diff)
V4L/DVB (12221): gspca - stv06xx-hdcs: Actually update the sensor state
Signed-off-by: Erik Andrén <erik.andren@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca')
-rw-r--r--drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c b/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c
index 3039ec208f3..ec7f5536a8a 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;