提交 6784cb35 编写于 作者: S Sean Anderson 提交者: Simon Glass

dm: core: Fix uninitialized return value from dm_scan_fdt_node

If there are no nodes or if all nodes are disabled, this function would
return err without setting it first. Fix this by initializing err to
zero.

Fixes: 94f7afdf ("dm: core: Ignore disabled devices when binding")
Signed-off-by: NSean Anderson <sean.anderson@seco.com>
Reviewed-by: NSimon Glass <sjg@chromium.org>
上级 feb7ac45
......@@ -265,7 +265,7 @@ int dm_scan_plat(bool pre_reloc_only)
static int dm_scan_fdt_node(struct udevice *parent, ofnode parent_node,
bool pre_reloc_only)
{
int ret = 0, err;
int ret = 0, err = 0;
ofnode node;
if (!ofnode_valid(parent_node))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册