[PATCH] fdtdec: fdtdec_get_aliases_highest_id: skip aliases to disabled nodes

Tim Harvey tharvey at gateworks.com
Fri Apr 16 23:30:41 CEST 2021


When looking for an alias with the highest id skip aliases for nodes
that are disabled.

Signed-off-by: Tim Harvey <tharvey at gateworks.com>
---
 lib/fdtdec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index 864589193b..d47195525a 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -546,6 +546,8 @@ int fdtdec_get_alias_highest_id(const void *blob, const char *base)
 		if (*prop != '/' || prop[len - 1] ||
 		    strncmp(name, base, base_len))
 			continue;
+		if (!fdtdec_get_is_enabled(blob, fdt_path_offset(blob, prop)))
+			continue;
 
 		val = trailing_strtol(name);
 		if (val > max) {
-- 
2.17.1



More information about the U-Boot mailing list