diff options
author | Alexey Starikovskiy <alexey.y.starikovskiy@linux.intel.com> | 2007-02-15 15:16:18 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-02-16 12:51:53 -0500 |
commit | c24e912b61b1ab2301c59777134194066b06465c (patch) | |
tree | ee93cc7f6cc01a0ed9d8d53acd8611434724524e /drivers/acpi | |
parent | 636cedf9df6a6442364e78b51925f306a1056e43 (diff) |
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>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/ec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 743ce27fa0bb..8f5aaf753fda 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c | |||
@@ -280,8 +280,10 @@ static int acpi_ec_transaction(struct acpi_ec *ec, u8 command, | |||
280 | mutex_lock(&ec->lock); | 280 | mutex_lock(&ec->lock); |
281 | if (ec->global_lock) { | 281 | if (ec->global_lock) { |
282 | status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &glk); | 282 | status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &glk); |
283 | if (ACPI_FAILURE(status)) | 283 | if (ACPI_FAILURE(status)) { |
284 | mutex_unlock(&ec->lock); | ||
284 | return -ENODEV; | 285 | return -ENODEV; |
286 | } | ||
285 | } | 287 | } |
286 | 288 | ||
287 | /* Make sure GPE is enabled before doing transaction */ | 289 | /* Make sure GPE is enabled before doing transaction */ |