提交 fe041646 编写于 作者: D Dan Carpenter 提交者: Mauro Carvalho Chehab

[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: NDan Carpenter <error27@gmail.com>
Signed-off-by: NSrinivasa Deevi <Srinivasa.deevi@conexant.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 50155c25
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册