[PATCH v6 03/20] dm: pci: Fix device PCI iteration

Simon Glass sjg at chromium.org
Mon Oct 17 23:29:25 CEST 2022


When there is no PCI bus uclass_first_device will return no bus and no
error which will result in pci_find_first_device calling
skip_to_next_device with no bus, and the bus is only checked at the end
of the while cycle, not the beginning.

Fixes: 76c3fbcd3d ("dm: pci: Add a way to iterate through all PCI devices")
Signed-off-by: Michal Suchanek <msuchanek at suse.de>
Reviewed-by: Simon Glass <sjg at chromium.org>
---
v6: Move dropping the use of uclass iterator return value to later patch
---
 drivers/pci/pci-uclass.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Applied to u-boot-dm, thanks!


More information about the U-Boot mailing list