]> git.sur5r.net Git - u-boot/blobdiff - tools/image-host.c
mkimage: Automatically expand FDT in more cases
[u-boot] / tools / image-host.c
index 2be5e8043c1dd9cefa7b0380dd51533bee473fea..faeef66efc43dbe9b847b959a1f67a7cb937964f 100644 (file)
@@ -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;