diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2015-08-20 06:40:25 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-08-26 07:54:13 -0700 |
commit | bc6351eb48c116e9d38329c06f7e5a87ea8ec8ac (patch) | |
tree | 304f26ce455915647cb92696e9b0e9a6bdf82c36 /lib/fdtdec.c | |
parent | 19b4a3369876f9215e2b861f211e8df1a75e26ca (diff) | |
download | u-boot-imx-bc6351eb48c116e9d38329c06f7e5a87ea8ec8ac.zip u-boot-imx-bc6351eb48c116e9d38329c06f7e5a87ea8ec8ac.tar.gz u-boot-imx-bc6351eb48c116e9d38329c06f7e5a87ea8ec8ac.tar.bz2 |
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 <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'lib/fdtdec.c')
-rw-r--r-- | lib/fdtdec.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/fdtdec.c b/lib/fdtdec.c index b65e1e6..81b54f8 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; |