Skip to content

Commit

Permalink
ACPI / debugger: Fix a redundant mutex unlock issue in acpi_aml_open()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lv Zheng authored and Rafael J. Wysocki committed Dec 28, 2015
1 parent ec74765 commit 59adb39
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/acpi/acpi_dbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand All @@ -531,6 +531,7 @@ static int acpi_aml_open(struct inode *inode, struct file *file)
acpi_aml_active_reader = NULL;
}
mutex_unlock(&acpi_aml_io.lock);
err_exit:
return ret;
}

Expand Down

0 comments on commit 59adb39

Please sign in to comment.