diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2009-02-23 16:12:58 +0100 |
---|---|---|
committer | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2009-02-23 16:12:58 +0100 |
commit | 5f142c1dc4286e15ad35fc32896d12a4badf84b7 (patch) | |
tree | 9031fa40a3d0371515008f310cbace7b333af831 /linux/drivers/media/video/tw9910.c | |
parent | 7c7069267de14d7c83c611220087cdddd8210604 (diff) | |
download | mediapointer-dvb-s2-5f142c1dc4286e15ad35fc32896d12a4badf84b7.tar.gz mediapointer-dvb-s2-5f142c1dc4286e15ad35fc32896d12a4badf84b7.tar.bz2 |
tw9910: bit mask operation fix on tw9910_mask_set.
From: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
drivers/media/video/tw9910.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
Diffstat (limited to 'linux/drivers/media/video/tw9910.c')
-rw-r--r-- | linux/drivers/media/video/tw9910.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/linux/drivers/media/video/tw9910.c b/linux/drivers/media/video/tw9910.c index 4593cdea7..ed8dca3bf 100644 --- a/linux/drivers/media/video/tw9910.c +++ b/linux/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); } |