summaryrefslogtreecommitdiff
path: root/drivers/acpi/acpi_dbg.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/acpi_dbg.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/acpi_dbg.c')
-rw-r--r--drivers/acpi/acpi_dbg.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/acpi/acpi_dbg.c b/drivers/acpi/acpi_dbg.c
index a2dcd62ea32f..f3bca448b305 100644
--- a/drivers/acpi/acpi_dbg.c
+++ b/drivers/acpi/acpi_dbg.c
@@ -752,11 +752,6 @@ int __init acpi_aml_init(void)
{
int ret = 0;
- if (!acpi_debugfs_dir) {
- ret = -ENOENT;
- goto err_exit;
- }
-
/* Initialize AML IO interface */
mutex_init(&acpi_aml_io.lock);
init_waitqueue_head(&acpi_aml_io.wait);
@@ -766,10 +761,6 @@ int __init acpi_aml_init(void)
S_IFREG | S_IRUGO | S_IWUSR,
acpi_debugfs_dir, NULL,
&acpi_aml_operations);
- if (acpi_aml_dentry == NULL) {
- ret = -ENODEV;
- goto err_exit;
- }
ret = acpi_register_debugger(THIS_MODULE, &acpi_aml_debugger);
if (ret)
goto err_fs;
@@ -788,10 +779,8 @@ void __exit acpi_aml_exit(void)
{
if (acpi_aml_initialized) {
acpi_unregister_debugger(&acpi_aml_debugger);
- if (acpi_aml_dentry) {
- debugfs_remove(acpi_aml_dentry);
- acpi_aml_dentry = NULL;
- }
+ debugfs_remove(acpi_aml_dentry);
+ acpi_aml_dentry = NULL;
acpi_aml_initialized = false;
}
}