Hi Lucas, On 10/21/2014 02:16 AM, Lucas Stach wrote:
Signed-off-by: Lucas Stach <dev@xxxxxxxxxx>
Acked-by: Bo Shen <voice.shen@xxxxxxxxx>
--- drivers/i2c/busses/i2c-at91.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c index deb4ea4..3a644cf 100644 --- a/drivers/i2c/busses/i2c-at91.c +++ b/drivers/i2c/busses/i2c-at91.c @@ -140,7 +140,7 @@ static void at91_calc_twi_clock(struct at91_twi_dev *dev, int twi_clk) static void at91_twi_write_next_byte(struct at91_twi_dev *dev) { - if (dev->buf_len <= 0) + if (!dev->buf_len) return; at91_twi_write(dev, AT91_TWI_THR, *dev->buf); @@ -156,7 +156,7 @@ static void at91_twi_write_next_byte(struct at91_twi_dev *dev) static void at91_twi_read_next_byte(struct at91_twi_dev *dev) { - if (dev->buf_len <= 0) + if (!dev->buf_len) return; *dev->buf = at91_twi_read(dev, AT91_TWI_RHR) & 0xff;
Best Regards, Bo Shen _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox