summaryrefslogtreecommitdiffstats
path: root/drivers/pci/remove.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2008-09-05 21:45:36 -0700
committerJesse Barnes <jbarnes@virtuousgeek.org>2008-10-20 10:54:25 -0700
commit11d587429e9cbb40ac20d7ed8126c66da0d7aba5 (patch)
treebad00f92efe41f10d32c080fe82c950736853103 /drivers/pci/remove.c
parent50cbfa511a21cac1909b6b4c955fa39d1da81457 (diff)
downloadlinux-11d587429e9cbb40ac20d7ed8126c66da0d7aba5.tar.bz2
PCI: fix sparse warning in pci_remove_behind_bridge
Get rid of the second definition of dev which hides the earlier one in the argument list and causes a warning from sparse. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/remove.c')
-rw-r--r--drivers/pci/remove.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/pci/remove.c b/drivers/pci/remove.c
index f94f6d5ae297..042e08924421 100644
--- a/drivers/pci/remove.c
+++ b/drivers/pci/remove.c
@@ -115,13 +115,9 @@ void pci_remove_behind_bridge(struct pci_dev *dev)
{
struct list_head *l, *n;
- if (dev->subordinate) {
- list_for_each_safe(l, n, &dev->subordinate->devices) {
- struct pci_dev *dev = pci_dev_b(l);
-
- pci_remove_bus_device(dev);
- }
- }
+ if (dev->subordinate)
+ list_for_each_safe(l, n, &dev->subordinate->devices)
+ pci_remove_bus_device(pci_dev_b(l));
}
static void pci_stop_bus_devices(struct pci_bus *bus)