diff options
Diffstat (limited to 'drivers/dfu/dfu.c')
-rw-r--r-- | drivers/dfu/dfu.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/dfu/dfu.c b/drivers/dfu/dfu.c index 8bd5216017..50919fcae9 100644 --- a/drivers/dfu/dfu.c +++ b/drivers/dfu/dfu.c @@ -396,6 +396,8 @@ static int dfu_read_buffer_fill(struct dfu_entity *dfu, void *buf, int size) debug("%s: Read error!\n", __func__); return ret; } + if (dfu->b_left == 0) + break; dfu->offset += dfu->b_left; dfu->r_left -= dfu->b_left; |