summaryrefslogtreecommitdiff
path: root/drivers/acpi/custom_method.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-01-22 16:21:03 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2019-01-22 19:45:52 +0100
commit9ec6dbfbdc0ade855e6bc1da66e263e0d926697c (patch)
tree4374d454e65f92450f588cb398ddff7e9b7247fc /drivers/acpi/custom_method.c
parent49a57857aeea06ca831043acbb0fa5e0f50602fd (diff)
ACPI: no need to check return value of debugfs_create functions
When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> 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.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/acpi/custom_method.c b/drivers/acpi/custom_method.c
index 4451877f83b6..aa972dc5cb7e 100644
--- a/drivers/acpi/custom_method.c
+++ b/drivers/acpi/custom_method.c
@@ -79,14 +79,8 @@ static const struct file_operations cm_fops = {
static int __init acpi_custom_method_init(void)
{
- if (acpi_debugfs_dir == NULL)
- return -ENOENT;
-
cm_dentry = debugfs_create_file("custom_method", S_IWUSR,
acpi_debugfs_dir, NULL, &cm_fops);
- if (cm_dentry == NULL)
- return -ENODEV;
-
return 0;
}