libfdt: fix error code of fdt_count_strings()
Currently, this function returns a positive value on error, so we never know whether this function has succeeded or failed. For example, if the given property is not found, fdt_getprop() returns -FDT_ERR_NOTFOUND, and then this function inverts it, i.e., returns FDT_ERR_NOTFOUND (=1). Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Fixes: bc4147ab ("fdt: Add a function to count strings") Acked-by: NSimon Glass <sjg@chromium.org>
Showing
想要评论请 注册 或 登录