summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2015-07-15 01:08:43 +0900
committerSimon Glass <sjg@chromium.org>2015-07-20 07:21:47 -0600
commit31f334abc516a37257d09c4492808f3238e129fa (patch)
tree6c518fa271f9e2e9e16b08ec3bf57c76e107fba6 /lib
parent965fab1adf59586fe27e81f4def0aeadc51ec1d5 (diff)
downloadu-boot-imx-31f334abc516a37257d09c4492808f3238e129fa.zip
u-boot-imx-31f334abc516a37257d09c4492808f3238e129fa.tar.gz
u-boot-imx-31f334abc516a37257d09c4492808f3238e129fa.tar.bz2
libfdt: fix error code of fdt_get_string_index()
As mentioned in the comment block in include/libfdt.h, fdt_get_string_index() is supposed to return a negative value on error. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Fixes: 5094eb408a5d ("fdt: Add functions to retrieve strings") Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/libfdt/fdt_ro.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libfdt/fdt_ro.c b/lib/libfdt/fdt_ro.c
index 44fc0aa..38bfcbd 100644
--- a/lib/libfdt/fdt_ro.c
+++ b/lib/libfdt/fdt_ro.c
@@ -577,7 +577,7 @@ int fdt_get_string_index(const void *fdt, int node, const char *property,
index--;
}
- return FDT_ERR_NOTFOUND;
+ return -FDT_ERR_NOTFOUND;
}
int fdt_get_string(const void *fdt, int node, const char *property,