diff --git a/[refs] b/[refs] index bc4b65d59195..397b808be6df 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 051489119affd527f2834e9f8ba3e2a71bf1ca23 +refs/heads/master: 1af1b7a2def2f0936fc95edb5dcb3871934b7852 diff --git a/trunk/drivers/media/video/tw9910.c b/trunk/drivers/media/video/tw9910.c index 8dc3ec79a06f..0558b22fd3fb 100644 --- a/trunk/drivers/media/video/tw9910.c +++ b/trunk/drivers/media/video/tw9910.c @@ -460,9 +460,11 @@ static int tw9910_mask_set(struct i2c_client *client, u8 command, u8 mask, u8 set) { s32 val = i2c_smbus_read_byte_data(client, command); + if (val < 0) + return val; val &= ~mask; - val |= set; + val |= set & mask; return i2c_smbus_write_byte_data(client, command, val); }