]> git.karo-electronics.de Git - linux-beck.git/commitdiff
PCI: cpqphp: Remove unnecessary null test before debugfs_remove()
authorFabian Frederick <fabf@skynet.be>
Sat, 28 Jun 2014 09:44:43 +0000 (11:44 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 7 Jul 2014 20:53:44 +0000 (14:53 -0600)
Fix checkpatch warning:
"WARNING: debugfs_remove(NULL) is safe this check is probably not required"

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
CC: Ryan Desfosses <ryan@desfo.org>
drivers/pci/hotplug/cpqphp_sysfs.c

index 4a392c44e3d3abacef8717fac3489ede76e24376..d81648f71425120e0f9220a94b04c191ca0ed05a 100644 (file)
@@ -216,8 +216,7 @@ void cpqhp_create_debugfs_files(struct controller *ctrl)
 
 void cpqhp_remove_debugfs_files(struct controller *ctrl)
 {
-       if (ctrl->dentry)
-               debugfs_remove(ctrl->dentry);
+       debugfs_remove(ctrl->dentry);
        ctrl->dentry = NULL;
 }