Skip to content
Snippets Groups Projects
Commit 7c9786d6 authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Tom Rini
Browse files

libfdt: fix fdt_stringlist_count()


If fdt_getprop() fails, negative error code should be returned.

[ DTC commit: e28eff5b787adb3f461d1653598818b2f1f25a73 ]

Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
parent 28a3a43d
No related branches found
No related tags found
No related merge requests found
...@@ -550,7 +550,7 @@ int fdt_stringlist_count(const void *fdt, int nodeoffset, const char *property) ...@@ -550,7 +550,7 @@ int fdt_stringlist_count(const void *fdt, int nodeoffset, const char *property)
list = fdt_getprop(fdt, nodeoffset, property, &length); list = fdt_getprop(fdt, nodeoffset, property, &length);
if (!list) if (!list)
return -length; return length;
end = list + length; end = list + length;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment