summaryrefslogtreecommitdiff
path: root/linux/drivers/media
diff options
context:
space:
mode:
authorErik Andrén <erik.andren@gmail.com>2009-06-23 17:22:48 +0200
committerErik Andrén <erik.andren@gmail.com>2009-06-23 17:22:48 +0200
commit1da6ad98e478b29ad30ad485246a768225407d8b (patch)
treea14d9546c2d5a84de3590bdaec3bc2f01b80881f /linux/drivers/media
parent784f927dcf2cc497d4a2c44fb4f1321d9cf0c45b (diff)
downloadmediapointer-dvb-s2-1da6ad98e478b29ad30ad485246a768225407d8b.tar.gz
mediapointer-dvb-s2-1da6ad98e478b29ad30ad485246a768225407d8b.tar.bz2
gspca - stv06xx-hdcs: Actually update the sensor state
From: Erik Andrén <erik.andren@gmail.com> Priority: high Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r--linux/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/linux/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c b/linux/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c
index 3039ec208..ec7f5536a 100644
--- a/linux/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c
+++ b/linux/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;