pci: fix pciDeviceListSteal on multiple devices

pciDeviceListSteal(pcidevs, dev) removes dev from pcidevs reducing
the length of pcidevs, so moving onto what was the next dev is wrong.

Instead callers should pop entry 0 repeatedly until pcidevs is empty.

Signed-off-by: Steve Hodgson <shodgson@solarflare.com>
Signed-off-by: Shradha Shah <sshah@solarflare.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
Shradha Shah
2011-08-24 16:30:51 +01:00
committed by Eric Blake
parent ba0c219902
commit c0f025b8ba
2 changed files with 7 additions and 7 deletions

View File

@@ -190,6 +190,7 @@ Patches have also been contributed by:
Wieland Hoffmann <themineo@googlemail.com>
Douglas Schilling Landgraf <dougsland@redhat.com>
Tom Vijlbrief <tom.vijlbrief@xs4all.nl>
Shradha Shah <sshah@solarflare.com>
[....send patches to get your name here....]