summaryrefslogtreecommitdiff
path: root/include/spl.h
diff options
context:
space:
mode:
authorAndreas Dannenberg <dannenberg@ti.com>2019-08-15 23:55:26 +0300
committerTom Rini <trini@konsulko.com>2019-10-11 17:07:33 +0300
commit9d6ee3e23591f4eb733153aa7776f53d9fef57f1 (patch)
treebc4072ecad415a043b38a584d2708468f0729e54 /include/spl.h
parent44fb0d6c9f5147a41c710032869e5e01b3c9e310 (diff)
downloadu-boot-9d6ee3e23591f4eb733153aa7776f53d9fef57f1.tar.xz
spl: ymodem: Fix FIT loading termination handling
During FIT reading through ymodem_read_fit() the function xyzModem_stream_read() is being used which returns zero once the end of a stream has been reached. This could lead to an premature exit from ymodem_read_fit() with certain-sized FIT images reporting that zero bytes overall were read. Such a premature exit would then result in an -EIO failure being triggered within the spl_load_simple_fit() caller function and ultimately lead to a boot failure. Fix this logic by simply aborting the stream read loops and continuing with the regular code flow which ultimately would lead to returning the number of bytes to be read ('size') as expected by the callers of ymodem_read_fit(). Fixes: fa715193c083 ("spl: Add an option to load a FIT containing U-Boot from UART") Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Diffstat (limited to 'include/spl.h')
0 files changed, 0 insertions, 0 deletions