mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-01 08:59:33 +00:00
libfdt: fix fdt_stringlist_count()
If fdt_getprop() fails, negative error code should be returned. [ DTC commit: e28eff5b787adb3f461d1653598818b2f1f25a73 ] 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
28a3a43d7b
commit
7c9786d61f
1 changed files with 1 additions and 1 deletions
|
@ -550,7 +550,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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue