summaryrefslogtreecommitdiff
path: root/drivers/dfu/dfu.c
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2014-05-22 13:42:26 -0400
committerTom Rini <trini@ti.com>2014-05-22 13:42:26 -0400
commit8e3812859670fda61b98458864fa9f014fcd3dcc (patch)
tree059ebfe928823ba398beca7d4bd39da7a28481cc /drivers/dfu/dfu.c
parentc9afa7cea84c9b7346fcd2710577bcc386631aba (diff)
parentc8151b4a5de136ea2c2a0e6e9aec481810ee0460 (diff)
downloadu-boot-imx-8e3812859670fda61b98458864fa9f014fcd3dcc.zip
u-boot-imx-8e3812859670fda61b98458864fa9f014fcd3dcc.tar.gz
u-boot-imx-8e3812859670fda61b98458864fa9f014fcd3dcc.tar.bz2
Merge branch 'pr-15052014' of git://git.denx.de/u-boot-usb
Diffstat (limited to 'drivers/dfu/dfu.c')
-rw-r--r--drivers/dfu/dfu.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/dfu/dfu.c b/drivers/dfu/dfu.c
index 51b1026..a938109 100644
--- a/drivers/dfu/dfu.c
+++ b/drivers/dfu/dfu.c
@@ -131,6 +131,10 @@ int dfu_flush(struct dfu_entity *dfu, void *buf, int size, int blk_seq_num)
{
int ret = 0;
+ ret = dfu_write_buffer_drain(dfu);
+ if (ret)
+ return ret;
+
if (dfu->flush_medium)
ret = dfu->flush_medium(dfu);