提交 541156a3 编写于 作者: H Hanjun Guo 提交者: Rafael J. Wysocki

ACPI: APEI: Put the error injection table for error path and module exit

The mapped error injection table will be used after einj_init()
for debugfs, but it should be released for module exit and error
path of einj_init().
Signed-off-by: NHanjun Guo <guohanjun@huawei.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 3d995f88
......@@ -692,7 +692,7 @@ static int __init einj_init(void)
rc = einj_check_table(einj_tab);
if (rc) {
pr_warn(FW_BUG "Invalid EINJ table.\n");
return -EINVAL;
goto err_put_table;
}
rc = -ENOMEM;
......@@ -760,6 +760,8 @@ static int __init einj_init(void)
err_fini:
apei_resources_fini(&einj_resources);
debugfs_remove_recursive(einj_debug_dir);
err_put_table:
acpi_put_table((struct acpi_table_header *)einj_tab);
return rc;
}
......@@ -780,6 +782,7 @@ static void __exit einj_exit(void)
apei_resources_release(&einj_resources);
apei_resources_fini(&einj_resources);
debugfs_remove_recursive(einj_debug_dir);
acpi_put_table((struct acpi_table_header *)einj_tab);
}
module_init(einj_init);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册