PCI: fix sparse warning in pci_remove_behind_bridge
authorStephen Hemminger <shemminger@vyatta.com>
Sat, 6 Sep 2008 04:45:36 +0000 (21:45 -0700)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Mon, 20 Oct 2008 17:54:25 +0000 (10:54 -0700)
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>
drivers/pci/remove.c

index f94f6d5ae2971e6828ed5ad90dad4c0901737d1f..042e08924421bbd8d3c773a1ee40dfb50d9a2a1e 100644 (file)
@@ -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)