Browse Source

PCI: cpqphp: Remove unnecessary null test before debugfs_remove()

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>
Fabian Frederick 11 years ago
parent
commit
5d37818b9c
1 changed files with 1 additions and 2 deletions
  1. 1 2
      drivers/pci/hotplug/cpqphp_sysfs.c

+ 1 - 2
drivers/pci/hotplug/cpqphp_sysfs.c

@@ -216,8 +216,7 @@ void cpqhp_create_debugfs_files(struct controller *ctrl)
 
 
 void cpqhp_remove_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;
 	ctrl->dentry = NULL;
 }
 }