From: Bo Shen Date: Wed, 16 Oct 2013 09:26:37 +0000 (+0800) Subject: usb: dfu: decrease dfu->r_left along with the transfer X-Git-Tag: v2014.01-rc1~78^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c2617bc77323e75f68cc7aa6ce54bf39771f1e7a;p=platform%2Fkernel%2Fu-boot.git usb: dfu: decrease dfu->r_left along with the transfer The value of dfu->r_left need decrease along with the transfer Signed-off-by: Bo Shen --- diff --git a/drivers/dfu/dfu.c b/drivers/dfu/dfu.c index 4a8804e..cccc044 100644 --- a/drivers/dfu/dfu.c +++ b/drivers/dfu/dfu.c @@ -229,6 +229,7 @@ static int dfu_read_buffer_fill(struct dfu_entity *dfu, void *buf, int size) dfu->crc = crc32(dfu->crc, buf, chunk); dfu->i_buf += chunk; dfu->b_left -= chunk; + dfu->r_left -= chunk; size -= chunk; buf += chunk; readn += chunk;