From: Lv Zheng Date: Fri, 25 Dec 2015 03:22:32 +0000 (+0800) Subject: ACPI / debugger: Fix a redundant mutex unlock issue in acpi_aml_open() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=59adb3988ebeec012343317ac783d6a7935e0c83;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki --- 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) 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; }