From: Bin Meng Date: Thu, 20 Aug 2015 06:40:25 -0700 Subject: [U-Boot] [PATCH v2 09/12] fdtdec: Fix possible infinite loop in fdtdec_get_pci_vendev() In-Reply-To: <1440078028-29464-1-git-send-email-bmeng.cn@gmail.com> References: <1440078028-29464-1-git-send-email-bmeng.cn@gmail.com> Message-ID: <1440078028-29464-10-git-send-email-bmeng.cn@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- Changes in v2: None lib/fdtdec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/fdtdec.c b/lib/fdtdec.c index d21fb74..39268a2 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; -- 1.8.2.1