diff options
Diffstat (limited to 'common/bootm.c')
-rw-r--r-- | common/bootm.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/common/bootm.c b/common/bootm.c index 78d04d5806..59843195cd 100644 --- a/common/bootm.c +++ b/common/bootm.c @@ -336,6 +336,9 @@ int bootm_load_devicetree(struct image_data *data, unsigned long load_address) if (data->os_fit && data->os_fit->oftree) { data->of_root_node = of_unflatten_dtb(data->os_fit->oftree); + + if (IS_ERR(data->of_root_node)) + data->of_root_node = NULL; } else if (data->oftree_file) { size_t size; @@ -367,7 +370,8 @@ int bootm_load_devicetree(struct image_data *data, unsigned long load_address) free(oftree); - if (!data->of_root_node) { + if (IS_ERR(data->of_root_node)) { + data->of_root_node = NULL; pr_err("unable to unflatten devicetree\n"); return -EINVAL; } |