diff --git a/common/blspec.c b/common/blspec.c index 8132d14..b258e66 100644 --- a/common/blspec.c +++ b/common/blspec.c @@ -361,6 +361,14 @@ const char *compat; char *filename; + /* If the entry doesn't specifiy a devicetree we are compatible */ + devicetree = blspec_entry_var_get(entry, "devicetree"); + if (!devicetree) + return true; + + if (!strcmp(devicetree, "none")) + return true; + /* If we don't have a root node every entry is compatible */ barebox_root = of_get_root_node(); if (!barebox_root) @@ -375,14 +383,6 @@ else abspath = ""; - /* If the entry doesn't specifiy a devicetree we are compatible */ - devicetree = blspec_entry_var_get(entry, "devicetree"); - if (!devicetree) - return true; - - if (!strcmp(devicetree, "none")) - return true; - filename = basprintf("%s/%s", abspath, devicetree); fdt = read_file(filename, &size);