Skip to content

Commit 6010ce3

Browse files
committed
ACPI: debug: Clean up acpi_aml_init()
The err_exit label in acpi_aml_init() is not used any more after commit 9ec6dbf ("ACPI: no need to check return value of debugfs_create functions"), but the other label in there is not necessary too, so rearrange the code to get rid of them both. No intentional functional impact. Fixes: 9ec6dbf ("ACPI: no need to check return value of debugfs_create functions") Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 9ec6dbf commit 6010ce3

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

drivers/acpi/acpi_dbg.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -750,29 +750,28 @@ static const struct acpi_debugger_ops acpi_aml_debugger = {
750750

751751
int __init acpi_aml_init(void)
752752
{
753-
int ret = 0;
753+
int ret;
754754

755755
/* Initialize AML IO interface */
756756
mutex_init(&acpi_aml_io.lock);
757757
init_waitqueue_head(&acpi_aml_io.wait);
758758
acpi_aml_io.out_crc.buf = acpi_aml_io.out_buf;
759759
acpi_aml_io.in_crc.buf = acpi_aml_io.in_buf;
760+
760761
acpi_aml_dentry = debugfs_create_file("acpidbg",
761762
S_IFREG | S_IRUGO | S_IWUSR,
762763
acpi_debugfs_dir, NULL,
763764
&acpi_aml_operations);
764-
ret = acpi_register_debugger(THIS_MODULE, &acpi_aml_debugger);
765-
if (ret)
766-
goto err_fs;
767-
acpi_aml_initialized = true;
768765

769-
err_fs:
766+
ret = acpi_register_debugger(THIS_MODULE, &acpi_aml_debugger);
770767
if (ret) {
771768
debugfs_remove(acpi_aml_dentry);
772769
acpi_aml_dentry = NULL;
770+
return ret;
773771
}
774-
err_exit:
775-
return ret;
772+
773+
acpi_aml_initialized = true;
774+
return 0;
776775
}
777776

778777
void __exit acpi_aml_exit(void)

0 commit comments

Comments
 (0)