Browse Source

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>
Erik Andrén 16 years ago
parent
commit
36a516d953
1 changed files with 3 additions and 1 deletions
  1. 3 1
      drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c

+ 3 - 1
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;