spl: ymodem: Fix loading of fit image
authorLokesh Vutla <lokeshvutla@ti.com>
Thu, 14 Nov 2019 13:03:30 +0000 (18:33 +0530)
committerTom Rini <trini@konsulko.com>
Tue, 3 Dec 2019 13:44:14 +0000 (08:44 -0500)
commit095764e369ec7e313f6cb45f633b203b4ec622cc
tree577f874eb3f6f1346442a01fce48e9496dafb6a0
parent3ef94715cc011e3f0042019359f848f9f129b391
spl: ymodem: Fix loading of fit image

spl ymodem driver always assumes that 1 BUF_SIZE is read in one stream.
This might not be true when image is not padded to BUF_SIZE and the last
sector that gets loaded will be < BUF_SIZE. Drop this assumption and use
the actual size that is loaded.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
common/spl/spl_ymodem.c