From e3fcc2f04b88285be9b9f480461348dee33cdd3c Mon Sep 17 00:00:00 2001 From: Andrew de Quincy Date: Sat, 21 Jun 2003 13:52:08 +0000 Subject: Better fix for errorchecking bug in read_ucblocks --- linux/drivers/media/dvb/frontends/tda10045h.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'linux/drivers/media/dvb') diff --git a/linux/drivers/media/dvb/frontends/tda10045h.c b/linux/drivers/media/dvb/frontends/tda10045h.c index 49043bca3..5901f745d 100644 --- a/linux/drivers/media/dvb/frontends/tda10045h.c +++ b/linux/drivers/media/dvb/frontends/tda10045h.c @@ -1028,6 +1028,7 @@ int tda10045h_read_ucblocks(struct dvb_i2c_bus *i2c, u32 * ucblocks) tmp = tda10045h_read_byte(i2c, TDA10045H_UNCOR); if (tmp < 0) return -EIO; + tmp &= 0x7f; while (counter++ < 5) { tda10045h_write_mask(i2c, TDA10045H_UNCOR, 0x80, 0); tda10045h_write_mask(i2c, TDA10045H_UNCOR, 0x80, 0); @@ -1040,9 +1041,8 @@ int tda10045h_read_ucblocks(struct dvb_i2c_bus *i2c, u32 * ucblocks) if ((tmp2 < tmp) || (tmp2 == 0)) break; } - tmp &= 0x7f; // FIXME: calculate this properly - + // done if (tmp != 0x7f) { *ucblocks = tmp; -- cgit v1.2.3