Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
[sfrench/cifs-2.6.git] / drivers / i2c / busses / i2c-rk3x.c
index b41d979656697a4fa4bc1b5ddd2e56d1c70c550a..f486d0eac4d0202e3933f58a87f0537a587ee5ae 100644 (file)
@@ -238,7 +238,7 @@ static void rk3x_i2c_fill_transmit_buf(struct rk3x_i2c *i2c)
        for (i = 0; i < 8; ++i) {
                val = 0;
                for (j = 0; j < 4; ++j) {
-                       if (i2c->processed == i2c->msg->len)
+                       if ((i2c->processed == i2c->msg->len) && (cnt != 0))
                                break;
 
                        if (i2c->processed == 0 && cnt == 0)