Merge tag 'arm-plt-optimizations-for-v4.9' of git://git.linaro.org/people/ard.biesheu...
[deliverable/linux.git] / drivers / of / resolver.c
index d313d492f2786de8811cdc6396a10882e37c3d00..46325d6394cfe4913d07fcfab1f6f5210d89fa9f 100644 (file)
@@ -9,6 +9,8 @@
  * version 2 as published by the Free Software Foundation.
  */
 
+#define pr_fmt(fmt)    "OF: resolver: " fmt
+
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/of.h>
@@ -313,6 +315,11 @@ int of_resolve_phandles(struct device_node *resolve)
        phandle phandle, phandle_delta;
        int err;
 
+       if (!resolve)
+               pr_err("%s: null node\n", __func__);
+       if (resolve && !of_node_check_flag(resolve, OF_DETACHED))
+               pr_err("%s: node %s not detached\n", __func__,
+                        resolve->full_name);
        /* the resolve node must exist, and be detached */
        if (!resolve || !of_node_check_flag(resolve, OF_DETACHED))
                return -EINVAL;
@@ -369,6 +376,7 @@ int of_resolve_phandles(struct device_node *resolve)
 
        /* we need to fixup, but no root symbols... */
        if (!root_sym) {
+               pr_err("%s: no symbols in root of device tree.\n", __func__);
                err = -EINVAL;
                goto out;
        }
This page took 0.025566 seconds and 5 git commands to generate.