Skip to content

Commit 5d37818

Browse files
Fabian Frederickbjorn-helgaas
Fabian Frederick
authored andcommitted
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 <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> CC: Ryan Desfosses <[email protected]>
1 parent 0d25d35 commit 5d37818

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/pci/hotplug/cpqphp_sysfs.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,7 @@ void cpqhp_create_debugfs_files(struct controller *ctrl)
216216

217217
void cpqhp_remove_debugfs_files(struct controller *ctrl)
218218
{
219-
if (ctrl->dentry)
220-
debugfs_remove(ctrl->dentry);
219+
debugfs_remove(ctrl->dentry);
221220
ctrl->dentry = NULL;
222221
}
223222

0 commit comments

Comments
 (0)