From 9ec6dbfbdc0ade855e6bc1da66e263e0d926697c Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 22 Jan 2019 16:21:03 +0100 Subject: 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 Signed-off-by: Rafael J. Wysocki --- drivers/acpi/custom_method.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'drivers/acpi/custom_method.c') 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; } -- cgit v1.2.3