From: Alexey Starikovskiy Date: Thu, 15 Feb 2007 20:16:18 +0000 (+0300) Subject: ACPI: ec: add unlock in error path X-Git-Tag: v2.6.21-rc1~92^2~2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=c24e912b61b1ab2301c59777134194066b06465c;p=linux-2.6-omap-h63xx.git ACPI: ec: add unlock in error path Signed-off-by: Alexey Starikovskiy Signed-off-by: Len Brown --- diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 743ce27fa0b..8f5aaf753fd 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, 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 */