summaryrefslogtreecommitdiff
path: root/drivers/acpi/custom_method.c
diff options
context:
space:
mode:
authorzhong jiang <zhongjiang@huawei.com>2018-08-18 18:49:20 +0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-09-10 12:46:51 +0200
commit7e79a69273272df016928144062b97bcb11d1122 (patch)
tree71221a38283a99e3197bf27c32a10c8dad7e1c9e /drivers/acpi/custom_method.c
parent11da3a7f84f19c26da6f86af878298694ede0804 (diff)
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>
Diffstat (limited to 'drivers/acpi/custom_method.c')
-rw-r--r--drivers/acpi/custom_method.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/acpi/custom_method.c b/drivers/acpi/custom_method.c
index e967c1173ba3..4451877f83b6 100644
--- a/drivers/acpi/custom_method.c
+++ b/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)
{
- if (cm_dentry)
- debugfs_remove(cm_dentry);
+ debugfs_remove(cm_dentry);
}
module_init(acpi_custom_method_init);