summaryrefslogtreecommitdiff
path: root/drivers/of/fdt.c
diff options
context:
space:
mode:
authorXu Qiang <xuqiang36@huawei.com>2022-08-01 12:05:06 +0000
committerRob Herring <robh@kernel.org>2022-08-01 10:13:41 -0600
commit7913145afa51bbed9eaf8e5b4ee55fa9884a71e5 (patch)
tree6ee322257f33a9fe8716312a88c8a41d76a92b4e /drivers/of/fdt.c
parentbe55492e01ab8a2d259b3404ba24465a0ad27130 (diff)
of/fdt: declared return type does not match actual return type
The commit 649cab56de8e (“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: 649cab56de8e (“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
Diffstat (limited to 'drivers/of/fdt.c')
-rw-r--r--drivers/of/fdt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 872b7b54e197..e02a30c92719 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -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)