diff options
author | Simon Glass <sjg@chromium.org> | 2014-06-12 07:24:42 -0600 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-06-19 11:18:56 -0400 |
commit | 597a8b2c68574970dc38c55abe07712b6045776a (patch) | |
tree | 815ebb32149d51c50d4b0af257acc9f932446412 /tools | |
parent | 04819a4ff1c93972ac46aedd3f17becbd5e0b588 (diff) |
mkimage: Automatically expand FDT in more cases
The original code did not cover every case and there was a missing negative
sign in one case. Expand the coverage and fix the bug.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/image-host.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/image-host.c b/tools/image-host.c index 2be5e8043c1..faeef66efc4 100644 --- a/tools/image-host.c +++ b/tools/image-host.c @@ -609,11 +609,13 @@ static int fit_config_process_sig(const char *keydir, void *keydest, /* Write the public key into the supplied FDT file */ if (keydest) { ret = info.algo->add_verify_data(&info, keydest); + if (ret == -ENOSPC) + return -ENOSPC; if (ret) { printf("Failed to add verification data for '%s' signature node in '%s' image node\n", node_name, conf_name); - return ret == FDT_ERR_NOSPACE ? -ENOSPC : -EIO; } + return ret; } return 0; |