[media] cx231xxx: fix typo in saddr_len check

The original code compared "saddr_len" with zero twice in a nonsensical
way.  I asked the list, and Andy Walls and Sri Deevi say that the second
check should be if "saddr_len == 1".

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Srinivasa Deevi <Srinivasa.deevi@conexant.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Dan Carpenter 2010-12-23 16:38:53 -03:00 committed by Mauro Carvalho Chehab
parent 50155c25bf
commit fe04164647
1 changed files with 4 additions and 4 deletions

View File

@ -1515,7 +1515,7 @@ int cx231xx_read_i2c_master(struct cx231xx *dev, u8 dev_addr, u16 saddr,
if (saddr_len == 0)
saddr = 0;
else if (saddr_len == 0)
else if (saddr_len == 1)
saddr &= 0xff;
/* prepare xfer_data struct */
@ -1566,7 +1566,7 @@ int cx231xx_write_i2c_master(struct cx231xx *dev, u8 dev_addr, u16 saddr,
if (saddr_len == 0)
saddr = 0;
else if (saddr_len == 0)
else if (saddr_len == 1)
saddr &= 0xff;
/* prepare xfer_data struct */
@ -1600,7 +1600,7 @@ int cx231xx_read_i2c_data(struct cx231xx *dev, u8 dev_addr, u16 saddr,
if (saddr_len == 0)
saddr = 0;
else if (saddr_len == 0)
else if (saddr_len == 1)
saddr &= 0xff;
/* prepare xfer_data struct */
@ -1641,7 +1641,7 @@ int cx231xx_write_i2c_data(struct cx231xx *dev, u8 dev_addr, u16 saddr,
if (saddr_len == 0)
saddr = 0;
else if (saddr_len == 0)
else if (saddr_len == 1)
saddr &= 0xff;
/* prepare xfer_data struct */