lkml.org 
[lkml]   [2015]   [Dec]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] ACPI / debugger: Fix a redundant mutex unlock issue in acpi_aml_open()
Date
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>
---
drivers/acpi/acpi_dbg.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/acpi/acpi_dbg.c b/drivers/acpi/acpi_dbg.c
index fa18bd0..9c31b08 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)
if (ACPI_FAILURE(status)) {
pr_err("Failed to initialize debugger.\n");
ret = -EINVAL;
- goto err_lock;
+ goto err_exit;
}
pr_debug("Debugger thread initialized.\n");

@@ -531,6 +531,7 @@ err_lock:
acpi_aml_active_reader = NULL;
}
mutex_unlock(&acpi_aml_io.lock);
+err_exit:
return ret;
}

--
1.7.10


\
 
 \ /
  Last update: 2015-12-25 04:41    [W:0.300 / U:1.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site