diff options
author | Bo Shen <voice.shen@atmel.com> | 2013-10-16 17:26:37 +0800 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2013-11-08 20:46:20 +0100 |
commit | c2617bc77323e75f68cc7aa6ce54bf39771f1e7a (patch) | |
tree | 7d4cce70e15881dc776eae295bcf2756cc9c4275 | |
parent | 522c95647df3251ffda2749ded207f30964c8866 (diff) | |
download | u-boot-imx-c2617bc77323e75f68cc7aa6ce54bf39771f1e7a.zip u-boot-imx-c2617bc77323e75f68cc7aa6ce54bf39771f1e7a.tar.gz u-boot-imx-c2617bc77323e75f68cc7aa6ce54bf39771f1e7a.tar.bz2 |
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 <voice.shen@atmel.com>
-rw-r--r-- | drivers/dfu/dfu.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; |