]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:23:59 +0000 (14:23 +0200)
commit1112af3a3b2e81cdfa5bbd7e0379b6767ef7d7e9
tree9dc71ee7a0d13c641b16ebc02ef00e6523a983fd
parentd36ca098cfcc36d9559030e93bf0ae3f9083c019
of/fdt: declared return type does not match actual return type

[ 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 <xuqiang36@huawei.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220801120506.11461-2-xuqiang36@huawei.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/of/fdt.c