drivers/of: Specify parent node in of_fdt_unflatten_tree()
[cascardo/linux.git] / drivers / of / unittest.c
index 979b6e4..8c0f11c 100644 (file)
@@ -921,7 +921,7 @@ static int __init unittest_data_add(void)
                        "not running tests\n", __func__);
                return -ENOMEM;
        }
-       of_fdt_unflatten_tree(unittest_data, &unittest_data_node);
+       of_fdt_unflatten_tree(unittest_data, NULL, &unittest_data_node);
        if (!unittest_data_node) {
                pr_warn("%s: No tree to attach; not running tests\n", __func__);
                return -ENODATA;
@@ -1165,6 +1165,11 @@ static void of_unittest_destroy_tracked_overlays(void)
                                continue;
 
                        ret = of_overlay_destroy(id + overlay_first_id);
+                       if (ret == -ENODEV) {
+                               pr_warn("%s: no overlay to destroy for #%d\n",
+                                       __func__, id + overlay_first_id);
+                               continue;
+                       }
                        if (ret != 0) {
                                defers++;
                                pr_warn("%s: overlay destroy failed for #%d\n",