Message ID | 1476685470-4372-2-git-send-email-yamada.masahiro@socionext.com |
---|---|
State | Superseded |
Headers | show |
On 17 October 2016 at 00:24, Masahiro Yamada <yamada.masahiro@socionext.com> wrote: > If fdt_getprop() fails, negative error code should be returned. > > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> > --- > > lib/libfdt/fdt_ro.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Acked-by: Simon Glass <sjg@chromium.org> _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
diff --git a/lib/libfdt/fdt_ro.c b/lib/libfdt/fdt_ro.c index 7e894b7..fc08981 100644 --- a/lib/libfdt/fdt_ro.c +++ b/lib/libfdt/fdt_ro.c @@ -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;
If fdt_getprop() fails, negative error code should be returned. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> --- lib/libfdt/fdt_ro.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.9.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot