mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-01 08:59:33 +00:00
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: 94f7afdf7e
("dm: core: Ignore disabled devices when binding")
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
feb7ac457c
commit
6784cb35f5
1 changed files with 1 additions and 1 deletions
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue