From bc6351eb48c116e9d38329c06f7e5a87ea8ec8ac Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Thu, 20 Aug 2015 06:40:25 -0700 Subject: [PATCH] fdtdec: Fix possible infinite loop in fdtdec_get_pci_vendev() When there is no valid compatible string in current list, we should advance to next one in the compatible string list. Signed-off-by: Bin Meng Acked-by: Simon Glass --- lib/fdtdec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/fdtdec.c b/lib/fdtdec.c index b65e1e6185..81b54f88e8 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -207,9 +207,8 @@ int fdtdec_get_pci_vendev(const void *blob, int node, u16 *vendor, u16 *device) return 0; } - } else { - list += (len + 1); } + list += (len + 1); } return -ENOENT; -- 2.25.1