From: Simon Glass Date: Thu, 17 Dec 2020 04:20:12 +0000 (-0700) Subject: dm: Fix return value in dev_read_alias_seq() X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=4153e3a5fb9519beaa3e2c2dedd7e152a45c5ab8;p=u-boot.git 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 --- diff --git a/drivers/core/read.c b/drivers/core/read.c index 076125824c..fc74d64814 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,