aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Deegan <Tim.Deegan@citrix.com>2011-05-20 13:51:44 +0100
committerTim Deegan <Tim.Deegan@citrix.com>2011-05-20 13:51:44 +0100
commitfcf125cdcd66310380452d46ab9a5c427aae60db (patch)
tree4c7528a92d3fb11d39133dde68eaa861eb676a83
parent1c48be1fcbd558fb6f08479ce416f89ed184c7b5 (diff)
downloadxen-fcf125cdcd66310380452d46ab9a5c427aae60db.tar.gz
xen-fcf125cdcd66310380452d46ab9a5c427aae60db.tar.bz2
xen-fcf125cdcd66310380452d46ab9a5c427aae60db.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 2af69f46a7..3599e0c2ec 100644
--- a/xen/drivers/passthrough/pci.c
+++ b/xen/drivers/passthrough/pci.c
@@ -170,11 +170,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);