diff options
author | Sean Anderson <sean.anderson@seco.com> | 2021-04-08 17:15:00 -0400 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2021-04-29 03:23:39 -0700 |
commit | 6784cb35f52b1f742a4b56cc6b5697b6ca784598 (patch) | |
tree | 9af5d028a1a8d2d40ebaf30a46439696ba686601 /drivers/core | |
parent | feb7ac457c20ac575749471141722b0bbe6303ca (diff) | |
download | u-boot-6784cb35f52b1f742a4b56cc6b5697b6ca784598.zip u-boot-6784cb35f52b1f742a4b56cc6b5697b6ca784598.tar.gz u-boot-6784cb35f52b1f742a4b56cc6b5697b6ca784598.tar.bz2 |
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>
Diffstat (limited to 'drivers/core')
-rw-r--r-- | drivers/core/root.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/core/root.c b/drivers/core/root.c index d9a19c5..f852d86 100644 --- a/drivers/core/root.c +++ b/drivers/core/root.c @@ -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)) |