mirror of
https://github.com/dgibson/dtc.git
synced 2025-12-07 05:35:07 -05:00
libfdt: fix fdt_stringlist_search()
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
e28eff5b78
commit
daa75e8fa5
1 changed files with 1 additions and 1 deletions
|
|
@ -597,7 +597,7 @@ int fdt_stringlist_search(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;
|
||||||
|
|
||||||
len = strlen(string) + 1;
|
len = strlen(string) + 1;
|
||||||
end = list + length;
|
end = list + length;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue