aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Deegan <Tim.Deegan@citrix.com>2011-05-20 13:48:40 +0100
committerTim Deegan <Tim.Deegan@citrix.com>2011-05-20 13:48:40 +0100
commit9205fbd3b564f5467172dce06876dc13d09b04a8 (patch)
tree6311e82a187cc9b5aa16dda42a6bbc2d78ea224c
parent45e66d2b8d2e2ed445c2420445a948531e01d252 (diff)
downloadxen-9205fbd3b564f5467172dce06876dc13d09b04a8.tar.gz
xen-9205fbd3b564f5467172dce06876dc13d09b04a8.tar.bz2
xen-9205fbd3b564f5467172dce06876dc13d09b04a8.zip
pci_remove_device: fix linked list discipline
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com> xen-unstable changeset: 23352:ea48976517af xen-unstable date: Fri May 20 08:52:22 2011 +0100
-rw-r--r--xen/drivers/passthrough/pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c
index 5383394f0d..dbfe9dd57b 100644
--- a/xen/drivers/passthrough/pci.c
+++ b/xen/drivers/passthrough/pci.c
@@ -173,11 +173,11 @@ out:
int pci_remove_device(u8 bus, u8 devfn)
{
- struct pci_dev *pdev;
+ struct pci_dev *pdev, *tmp;
int ret = -ENODEV;
spin_lock(&pcidevs_lock);
- list_for_each_entry ( pdev, &alldevs_list, alldevs_list )
+ list_for_each_entry_safe ( pdev, tmp, &alldevs_list, alldevs_list )
if ( pdev->bus == bus && pdev->devfn == devfn )
{
ret = iommu_remove_device(pdev);