diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2016-10-17 15:08:23 +0900 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2016-10-17 20:56:58 +1100 |
commit | e28eff5b787adb3f461d1653598818b2f1f25a73 (patch) | |
tree | 17c0414381222082fd2b39aa1fcd0045af373271 | |
parent | ae97c7722840148b636ac8fde2de3d0a24c04cfc (diff) | |
download | dtc-e28eff5b787adb3f461d1653598818b2f1f25a73.zip dtc-e28eff5b787adb3f461d1653598818b2f1f25a73.tar.gz dtc-e28eff5b787adb3f461d1653598818b2f1f25a73.tar.bz2 |
libfdt: fix fdt_stringlist_count()
If fdt_getprop() fails, negative error code should be returned.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-rw-r--r-- | libfdt/fdt_ro.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |