On Mon, Oct 17, 2016 at 03:08:23PM +0900, Masahiro Yamada wrote: > If fdt_getprop() fails, negative error code should be returned. > > Signed-off-by: Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx> Nice catch. Both fixes applied to master. > --- > > libfdt/fdt_ro.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > 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; > -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
Attachment:
signature.asc
Description: PGP signature