ACPI: ec: add unlock in error path

Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
Alexey Starikovskiy 2007-02-15 23:16:18 +03:00 committed by Len Brown
parent 636cedf9df
commit c24e912b61
1 changed files with 3 additions and 1 deletions

View File

@ -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 */