On Tue, 27 Sept 2022 at 15:38, Michal Suchanek <msucha...@suse.de> wrote: > > 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. > > Also stop dealing with the return value of > uclass_first_device/uclass_next_device - once the iteration is fixed to > continue after an error there is nothing meaningful to get anymore. > > Fixes: 76c3fbcd3d ("dm: pci: Add a way to iterate through all PCI devices")
Please split the patches, with the first one having the fixes tag. The second part is not a fix, but an update based on your changes in this series. > Signed-off-by: Michal Suchanek <msucha...@suse.de> > --- > drivers/pci/pci-uclass.c | 19 +++++-------------- > 1 file changed, 5 insertions(+), 14 deletions(-) with that: Reviewed-by: Simon Glass <s...@chromium.org>