summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/devices/pmc551.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2014-11-20 13:50:43 +0100
committerBrian Norris <computersforpeace@gmail.com>2014-11-25 22:44:10 -0800
commit05a221bb1f49e6eebc9a3858cb45506f403b3ab6 (patch)
treeaa85b86eb0cc5d7aca9e6da39394157d8491f87c /drivers/mtd/devices/pmc551.c
parent775a9134f4398ca98a10af8cc3cf9b664017267f (diff)
mtd: delete unnecessary checks before two function calls
The functions kfree() and pci_dev_put() test whether their argument is NULL and then return 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: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd/devices/pmc551.c')
-rw-r--r--drivers/mtd/devices/pmc551.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mtd/devices/pmc551.c b/drivers/mtd/devices/pmc551.c
index f02603e1bfe..708b7e8c8b1 100644
--- a/drivers/mtd/devices/pmc551.c
+++ b/drivers/mtd/devices/pmc551.c
@@ -812,8 +812,7 @@ static int __init init_pmc551(void)
}
/* Exited early, reference left over */
- if (PCI_Device)
- pci_dev_put(PCI_Device);
+ pci_dev_put(PCI_Device);
if (!pmc551list) {
printk(KERN_NOTICE "pmc551: not detected\n");