aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSimon Glass2020-12-16 21:20:12 -0700
committerSimon Glass2020-12-18 20:32:21 -0700
commit4153e3a5fb9519beaa3e2c2dedd7e152a45c5ab8 (patch)
treeaa21c5b7aa4b8feaf38fb51962e2455c3f0a8fa8 /drivers
parentba0e7daeefa1ae9821c9fb3103ea7c3ddd2dd2f8 (diff)
dm: Fix return value in dev_read_alias_seq()
This should return 0 on success but currently does not. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/core/read.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/core/read.c b/drivers/core/read.c
index 076125824ca..fc74d64814f 100644
--- a/drivers/core/read.c
+++ b/drivers/core/read.c
@@ -281,8 +281,10 @@ int dev_read_alias_seq(const struct udevice *dev, int *devnump)
if (ofnode_is_np(node)) {
ret = of_alias_get_id(ofnode_to_np(node), uc_name);
- if (ret >= 0)
+ if (ret >= 0) {
*devnump = ret;
+ ret = 0;
+ }
} else {
#if CONFIG_IS_ENABLED(OF_CONTROL)
ret = fdtdec_get_alias_seq(gd->fdt_blob, uc_name,