mirror of https://gitee.com/openkylin/linux.git
[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:
parent
50155c25bf
commit
fe04164647
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue