From: Bin Meng Date: Thu, 20 Aug 2015 13:40:25 +0000 (-0700) Subject: fdtdec: Fix possible infinite loop in fdtdec_get_pci_vendev() X-Git-Tag: v2015.10-rc3~92^2~20 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=bc6351eb48c116e9d38329c06f7e5a87ea8ec8ac;p=u-boot 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 --- 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;