aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/probe.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2014-11-10 23:02:17 -0500
committerBjorn Helgaas <bhelgaas@google.com>2014-11-10 23:02:17 -0500
commitff0387c3777f2438bad2088abe442c9f231b0be4 (patch)
tree8c3697b4a4f9474f1a9c06b2f36692d8436371a6 /drivers/pci/probe.c
parentf114040e3ea6e07372334ade75d1ee0775c355e1 (diff)
PCI: Delete unnecessary NULL pointer checks
The functions pci_dev_put(), pci_pme_wakeup_bus(), and put_device() return immediately if their argument is NULL. Thus the test before the call is not needed. Remove these unnecessary tests. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r--drivers/pci/probe.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 5ed99309c758..eb927c04e290 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -87,8 +87,7 @@ static void release_pcibus_dev(struct device *dev)
87{ 87{
88 struct pci_bus *pci_bus = to_pci_bus(dev); 88 struct pci_bus *pci_bus = to_pci_bus(dev);
89 89
90 if (pci_bus->bridge) 90 put_device(pci_bus->bridge);
91 put_device(pci_bus->bridge);
92 pci_bus_remove_resources(pci_bus); 91 pci_bus_remove_resources(pci_bus);
93 pci_release_bus_of_node(pci_bus); 92 pci_release_bus_of_node(pci_bus);
94 kfree(pci_bus); 93 kfree(pci_bus);