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>
This commit is contained in:
Erik Andrén 2009-06-23 12:22:48 -03:00 committed by Mauro Carvalho Chehab
parent 4be3bd7849
commit 36a516d953

View File

@ -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;