Skip to content

Commit

Permalink
ACPI: ec: add unlock in error path
Browse files Browse the repository at this point in the history
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Alexey Starikovskiy authored and Len Brown committed Feb 16, 2007
1 parent 636cedf commit c24e912
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/acpi/ec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit c24e912

Please sign in to comment.