Преглед изворни кода

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 година
родитељ
комит
5d37818b9c
1 измењених фајлова са 1 додато и 2 уклоњено
  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)
 {
-	if (ctrl->dentry)
-		debugfs_remove(ctrl->dentry);
+	debugfs_remove(ctrl->dentry);
 	ctrl->dentry = NULL;
 }