]> git.baikalelectronics.ru Git - kernel.git/commitdiff
of/fdt: declared return type does not match actual return type
authorXu Qiang <xuqiang36@huawei.com>
Mon, 1 Aug 2022 12:05:06 +0000 (12:05 +0000)
committerRob Herring <robh@kernel.org>
Mon, 1 Aug 2022 16:13:41 +0000 (10:13 -0600)
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 <xuqiang36@huawei.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220801120506.11461-2-xuqiang36@huawei.com
drivers/of/fdt.c

index 872b7b54e197dad44ab049a94a22feae55f8deba..e02a30c927191db9c183b6c0b49391ad4996e222 100644 (file)
@@ -246,7 +246,7 @@ static int populate_node(const void *blob,
        }
 
        *pnp = np;
-       return true;
+       return 0;
 }
 
 static void reverse_nodes(struct device_node *parent)