tools: Correct error handling in fit_image_process_hash()
authorSimon Glass <sjg@chromium.org>
Sun, 3 Jul 2016 15:40:44 +0000 (09:40 -0600)
committerTom Rini <trini@konsulko.com>
Thu, 14 Jul 2016 22:22:37 +0000 (18:22 -0400)
commit1152a05ee6593bf3036337cd18edd355589ea3a8
tree49b12a9b92c0df2cdc2711bb41ffbba471331c9f
parent655cc69655f058e0354d5db4179c92d2ac0081ba
tools: Correct error handling in fit_image_process_hash()

We should not be returning -1 as an error code. This can mask a situation
where we run out of space adding things to the FIT. By returning the correct
error in this case (-ENOSPC) it can be handled by the higher-level code.

This may fix the error reported by Tom Van Deun here:

https://www.mail-archive.com/u-boot@lists.denx.de/msg217417.html

although I am not sure as I cannot actually repeat it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Tom Van Deun <tom.vandeun@wapice.com>
Reviewed-by: Teddy Reed <teddy.reed@gmail.com>
tools/image-host.c