提交 c24e912b 编写于 作者: A Alexey Starikovskiy 提交者: Len Brown

ACPI: ec: add unlock in error path

Signed-off-by: NAlexey Starikovskiy <alexey.y.starikovskiy@linux.intel.com>
Signed-off-by: NLen Brown <len.brown@intel.com>
上级 636cedf9
......@@ -280,8 +280,10 @@ static int acpi_ec_transaction(struct acpi_ec *ec, u8 command,
mutex_lock(&ec->lock);
if (ec->global_lock) {
status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &glk);
if (ACPI_FAILURE(status))
if (ACPI_FAILURE(status)) {
mutex_unlock(&ec->lock);
return -ENODEV;
}
}
/* Make sure GPE is enabled before doing transaction */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册