Skip to content

Commit 7913145

Browse files
Xu Qiangrobherring
authored andcommitted
of/fdt: declared return type does not match actual return type
The commit 649cab5 (“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: 649cab5 (“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
1 parent be55492 commit 7913145

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/of/fdt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ static int populate_node(const void *blob,
246246
}
247247

248248
*pnp = np;
249-
return true;
249+
return 0;
250250
}
251251

252252
static void reverse_nodes(struct device_node *parent)

0 commit comments

Comments
 (0)