]> git.dujemihanovic.xyz Git - u-boot.git/commit
dm: core: Fix uninitialized return value from dm_scan_fdt_node
authorSean Anderson <sean.anderson@seco.com>
Thu, 8 Apr 2021 21:15:00 +0000 (17:15 -0400)
committerSimon Glass <sjg@chromium.org>
Thu, 29 Apr 2021 10:23:39 +0000 (03:23 -0700)
commit6784cb35f52b1f742a4b56cc6b5697b6ca784598
tree9af5d028a1a8d2d40ebaf30a46439696ba686601
parentfeb7ac457c20ac575749471141722b0bbe6303ca
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>
drivers/core/root.c