[PATCH] fixup! PBL: fdt: implement fdt_device_get_match_data

Ahmad Fatoum ahmad at a3f.at
Sat Apr 3 10:49:02 BST 2021


Forgot to squash

Signed-off-by: Ahmad Fatoum <ahmad at a3f.at>
---
 pbl/fdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pbl/fdt.c b/pbl/fdt.c
index 03260cb61971..8ec128f35987 100644
--- a/pbl/fdt.c
+++ b/pbl/fdt.c
@@ -94,7 +94,7 @@ const void *fdt_device_get_match_data(const void *fdt, const char *nodepath,
 			return NULL;
 
 		for (id = ids; id->compatible; id++) {
-			if (strlen(id->compatible) == length &&
+			if (strlen(id->compatible) + 1 == length &&
 			    !memcmp(list, id->compatible, length))
 				return id->data;
 		}
-- 
2.30.0




More information about the barebox mailing list