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: KARO-TX6-2015-09-18~146 X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-uboot.git;a=commitdiff_plain;h=499b2533ea15d3362f7d85e64281860c99be4182 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;