浏览代码

ACPI: custom_method: remove meaningless null check before debugfs_remove()

debugfs_remove() has taken null pointer into account. So it is safe
to remove the check before debugfs_remove().

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
zhong jiang 7 年之前
父节点
当前提交
7e79a69273
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      drivers/acpi/custom_method.c

+ 1 - 2
drivers/acpi/custom_method.c

@@ -92,8 +92,7 @@ static int __init acpi_custom_method_init(void)
 
 
 static void __exit acpi_custom_method_exit(void)
 static void __exit acpi_custom_method_exit(void)
 {
 {
-	if (cm_dentry)
-		debugfs_remove(cm_dentry);
+	debugfs_remove(cm_dentry);
 }
 }
 
 
 module_init(acpi_custom_method_init);
 module_init(acpi_custom_method_init);