diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 55f1b839114924aeaae2baf1f10a2db145037cca..085c6389afd135b25987add40f31725e33f4db0d 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -517,7 +517,7 @@ static void *__unflatten_device_tree(const void *blob, pr_warning("End of tree marker overwritten: %08x\n", be32_to_cpup(mem + size)); - if (detached) { + if (detached && mynodes) { of_node_set_flag(*mynodes, OF_DETACHED); pr_debug("unflattened tree is detached\n"); }