libfdt: Drop -FDT_ERR_TOODEEP
authorSimon Glass <sjg@chromium.org>
Mon, 10 Jul 2017 03:30:17 +0000 (21:30 -0600)
committerTom Rini <trini@konsulko.com>
Mon, 10 Jul 2017 12:39:24 +0000 (08:39 -0400)
This error code has not been upstreamed and is not really needed since it
is unlikely to be triggered. Drop it to maintain compatability with
upstream.

Reported-by: Peter Robinson <pbrobinson@gmail.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
lib/libfdt/fdt_region.c
lib/libfdt/libfdt.h

index 8b8a54755549844a3479d7a5d42d2d43e25d24b4..63099f1d969218f9184dff96a3238888ac1759f8 100644 (file)
@@ -397,7 +397,7 @@ int fdt_next_region(const void *fdt,
                        last_node = offset;
                        p.depth++;
                        if (p.depth == FDT_MAX_DEPTH)
-                               return -FDT_ERR_TOODEEP;
+                               return -FDT_ERR_BADSTRUCTURE;
                        name = fdt_get_name(fdt, offset, &len);
                        if (p.end - path + 2 + len >= path_len)
                                return -FDT_ERR_NOSPACE;
index 2f7ebf8e068a291363dbf246d317c8a12631b875..f3f9cad18409448fea2ead78a79b1db79be414a9 100644 (file)
        /* FDT_ERR_NOPHANDLES: The device tree doesn't have any
         * phandle available anymore without causing an overflow */
 
-#define FDT_ERR_TOODEEP        18
-       /* FDT_ERR_TOODEEP: The depth of a node has exceeded the internal
-        * libfdt limit. This can happen if you have more than
-        * FDT_MAX_DEPTH nested nodes. */
-
-#define FDT_ERR_MAX            18
+#define FDT_ERR_MAX            17
 
 /**********************************************************************/
 /* Low-level functions (you probably don't need these)                */