summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/bootm.c11
-rw-r--r--common/image-fit.c8
2 files changed, 10 insertions, 9 deletions
diff --git a/common/bootm.c b/common/bootm.c
index 169000cccb..36f6c41bbd 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -562,18 +562,15 @@ int bootm_boot(struct bootm_data *bootm_data)
data->os_entry = bootm_data->os_entry;
ret = read_file_2(data->os_file, &size, &data->os_header, PAGE_SIZE);
- if (ret < 0 && ret != -EFBIG)
+ if (ret < 0 && ret != -EFBIG) {
+ printf("could not open %s: %s\n", data->os_file,
+ strerror(-ret));
goto err_out;
+ }
if (size < PAGE_SIZE)
goto err_out;
os_type = file_detect_type(data->os_header, PAGE_SIZE);
- if ((int)os_type < 0) {
- printf("could not open %s: %s\n", data->os_file,
- strerror(-os_type));
- ret = (int)os_type;
- goto err_out;
- }
if (!data->force && os_type == filetype_unknown) {
printf("Unknown OS filetype (try -f)\n");
diff --git a/common/image-fit.c b/common/image-fit.c
index dfd1fa02c9..87a55b7e27 100644
--- a/common/image-fit.c
+++ b/common/image-fit.c
@@ -392,7 +392,9 @@ static int fit_verify_hash(struct fit_handle *handle, struct device_node *image,
ret = -EINVAL;
}
- hash = of_get_child_by_name(image, "hash@1");
+ hash = of_get_child_by_name(image, "hash-1");
+ if (!hash)
+ hash = of_get_child_by_name(image, "hash@1");
if (!hash) {
if (ret)
pr_err("image %s does not have hashes\n",
@@ -468,7 +470,9 @@ static int fit_image_verify_signature(struct fit_handle *handle,
ret = -EINVAL;
}
- sig_node = of_get_child_by_name(image, "signature@1");
+ sig_node = of_get_child_by_name(image, "signature-1");
+ if (!sig_node)
+ sig_node = of_get_child_by_name(image, "signature@1");
if (!sig_node) {
pr_err("Image %s has no signature\n", image->full_name);
return ret;