From: Stephen Hemminger Date: Sat, 6 Sep 2008 04:45:36 +0000 (-0700) Subject: PCI: fix sparse warning in pci_remove_behind_bridge X-Git-Tag: v2.6.28-rc1~77^2~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=11d587429e9cbb40ac20d7ed8126c66da0d7aba5;p=platform%2Fupstream%2Fkernel-adaptation-pc.git 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 Signed-off-by: Jesse Barnes --- diff --git a/drivers/pci/remove.c b/drivers/pci/remove.c index f94f6d5..042e089 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)