]> git.sur5r.net Git - u-boot/blobdiff - lib/libfdt/fdt_ro.c
dm: mmc: Add a legacy block interface for MMC
[u-boot] / lib / libfdt / fdt_ro.c
index 44fc0aa900d2556996ab5f9ef7c87f12fca517ce..7b0777b67eb3cbb92609ae81366ef4bf66d1944b 100644 (file)
@@ -517,7 +517,7 @@ int fdt_count_strings(const void *fdt, int node, const char *property)
 
        list = fdt_getprop(fdt, node, property, &length);
        if (!list)
-               return -length;
+               return length;
 
        for (i = 0; i < length; i++) {
                int len = strlen(list);
@@ -577,7 +577,7 @@ int fdt_get_string_index(const void *fdt, int node, const char *property,
                index--;
        }
 
-       return FDT_ERR_NOTFOUND;
+       return -FDT_ERR_NOTFOUND;
 }
 
 int fdt_get_string(const void *fdt, int node, const char *property,