aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2015-12-24 22:22:32 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-12-27 19:29:41 -0500
commit59adb3988ebeec012343317ac783d6a7935e0c83 (patch)
treed4d2290d0a9afece99faa1bb173c58f74306bc15
parentec74765d9f592715292b8b33689a6af6db4cf5c5 (diff)
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: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/acpi/acpi_dbg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/acpi/acpi_dbg.c b/drivers/acpi/acpi_dbg.c
index e8d1698c15bb..15e4604efba7 100644
--- a/drivers/acpi/acpi_dbg.c
+++ b/drivers/acpi/acpi_dbg.c
@@ -514,7 +514,7 @@ static int acpi_aml_open(struct inode *inode, struct file *file)
514 if (ACPI_FAILURE(status)) { 514 if (ACPI_FAILURE(status)) {
515 pr_err("Failed to initialize debugger.\n"); 515 pr_err("Failed to initialize debugger.\n");
516 ret = -EINVAL; 516 ret = -EINVAL;
517 goto err_lock; 517 goto err_exit;
518 } 518 }
519 pr_debug("Debugger thread initialized.\n"); 519 pr_debug("Debugger thread initialized.\n");
520 520
@@ -531,6 +531,7 @@ err_lock:
531 acpi_aml_active_reader = NULL; 531 acpi_aml_active_reader = NULL;
532 } 532 }
533 mutex_unlock(&acpi_aml_io.lock); 533 mutex_unlock(&acpi_aml_io.lock);
534err_exit:
534 return ret; 535 return ret;
535} 536}
536 537