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>
This commit is contained in:
parent
ae97c77228
commit
e28eff5b78
1 changed files with 1 additions and 1 deletions
|
@ -571,7 +571,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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue