diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2014-12-27 02:28:08 +0300 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-12-27 02:28:08 +0300 |
commit | 17f14b51f2dc2fce2636ee49c5fbf49ff27aecb0 (patch) | |
tree | d66b5b0d03a9e40ac7ba5b35cd78357092a3b24c /drivers/pci/hotplug | |
parent | 97bf6af1f928216fd6c5a66e8a57bfa95a659672 (diff) | |
download | linux-17f14b51f2dc2fce2636ee49c5fbf49ff27aecb0.tar.xz |
PCI: Delete unnecessary NULL pointer checks
The pci_dev_put() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.
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/hotplug')
-rw-r--r-- | drivers/pci/hotplug/cpci_hotplug_core.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pci/hotplug/cpci_hotplug_core.c b/drivers/pci/hotplug/cpci_hotplug_core.c index a5a7fd8332ac..46db29395a62 100644 --- a/drivers/pci/hotplug/cpci_hotplug_core.c +++ b/drivers/pci/hotplug/cpci_hotplug_core.c @@ -214,8 +214,7 @@ static void release_slot(struct hotplug_slot *hotplug_slot) kfree(slot->hotplug_slot->info); kfree(slot->hotplug_slot); - if (slot->dev) - pci_dev_put(slot->dev); + pci_dev_put(slot->dev); kfree(slot); } |