提交 59adb398 编写于 作者: L Lv Zheng 提交者: Rafael J. Wysocki

ACPI / debugger: Fix a redundant mutex unlock issue in acpi_aml_open()

Fix a double mutex_unlock() issue where acpi_initialize_debugger() is
called with the mutex already unlocked.
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NLv Zheng <lv.zheng@intel.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 ec74765d
...@@ -514,7 +514,7 @@ static int acpi_aml_open(struct inode *inode, struct file *file) ...@@ -514,7 +514,7 @@ static int acpi_aml_open(struct inode *inode, struct file *file)
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
pr_err("Failed to initialize debugger.\n"); pr_err("Failed to initialize debugger.\n");
ret = -EINVAL; ret = -EINVAL;
goto err_lock; goto err_exit;
} }
pr_debug("Debugger thread initialized.\n"); pr_debug("Debugger thread initialized.\n");
...@@ -531,6 +531,7 @@ static int acpi_aml_open(struct inode *inode, struct file *file) ...@@ -531,6 +531,7 @@ static int acpi_aml_open(struct inode *inode, struct file *file)
acpi_aml_active_reader = NULL; acpi_aml_active_reader = NULL;
} }
mutex_unlock(&acpi_aml_io.lock); mutex_unlock(&acpi_aml_io.lock);
err_exit:
return ret; return ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册