From 1112af3a3b2e81cdfa5bbd7e0379b6767ef7d7e9 Mon Sep 17 00:00:00 2001 From: Xu Qiang Date: Mon, 1 Aug 2022 12:05:06 +0000 Subject: [PATCH] of/fdt: declared return type does not match actual return type MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit [ Upstream commit be9441b493df6ee04492bf44d934e1eafc632f2e ] The commit 087b5dff2634 (“of: properly check for error returned by fdt_get_name()”) changed the return value type from bool to int, but forgot to change the return value simultaneously. populate_node was only called in unflatten_dt_nodes, and returns with values greater than or equal to 0 were discarded without further processing. Considering that return 0 usually indicates success, return 0 instead of return true. Fixes: 087b5dff2634 (“of: properly check for error returned by fdt_get_name()”) Signed-off-by: Xu Qiang Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20220801120506.11461-2-xuqiang36@huawei.com Signed-off-by: Sasha Levin --- drivers/of/fdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 59a7a9ee58ef7..d245628b15dd4 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -245,7 +245,7 @@ static int populate_node(const void *blob, } *pnp = np; - return true; + return 0; } static void reverse_nodes(struct device_node *parent) -- 2.39.5