diff --git a/libfdt/fdt_ro.c b/libfdt/fdt_ro.c index 0459098..db8d10f 100644 --- a/libfdt/fdt_ro.c +++ b/libfdt/fdt_ro.c @@ -571,7 +571,7 @@ int fdt_stringlist_count(const void *fdt, int nodeoffset, const char *property) list = fdt_getprop(fdt, nodeoffset, property, &length); if (!list) - return -length; + return length; end = list + length;