Commit bc6351eb48c116e9d38329c06f7e5a87ea8ec8ac

Authored by Bin Meng
Committed by Simon Glass
1 parent 19b4a33698

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>

Showing 1 changed file with 1 additions and 2 deletions Side-by-side Diff

... ... @@ -207,9 +207,8 @@
207 207  
208 208 return 0;
209 209 }
210   - } else {
211   - list += (len + 1);
212 210 }
  211 + list += (len + 1);
213 212 }
214 213  
215 214 return -ENOENT;