aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media')
-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 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)
174 } 174 }
175 175
176 ret = stv06xx_write_sensor(sd, HDCS_REG_CONTROL(sd), val); 176 ret = stv06xx_write_sensor(sd, HDCS_REG_CONTROL(sd), val);
177 if (ret < 0) 177
178 /* Update the state if the write succeeded */
179 if (!ret)
178 hdcs->state = state; 180 hdcs->state = state;
179 181
180 return ret; 182 return ret;