From ac779aee61cac645ac21dbec1d98f4e46a4a24f4 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Sun, 14 Feb 2010 23:00:46 -0800 Subject: [PATCH] kernel - ACPI - Fix missing unlocks in error path in acpi_ec * Add missing unlocks Submitted-by: Edward O'Callaghan --- sys/dev/acpica5/acpi_ec.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/sys/dev/acpica5/acpi_ec.c b/sys/dev/acpica5/acpi_ec.c index 62132fc..e14732e 100644 --- a/sys/dev/acpica5/acpi_ec.c +++ b/sys/dev/acpica5/acpi_ec.c @@ -619,6 +619,7 @@ EcGpeQueryHandler(void *Context) /* Serialize user access with EcSpaceHandler(). */ Status = EcLock(sc); if (ACPI_FAILURE(Status)) { + EcUnlock(sc); device_printf(sc->ec_dev, "GpeQuery lock error: %s\n", AcpiFormatException(Status)); return; @@ -762,8 +763,10 @@ EcSpaceHandler(UINT32 Function, ACPI_PHYSICAL_ADDRESS Address, UINT32 width, /* Serialize with EcGpeQueryHandler() at transaction granularity. */ Status = EcLock(sc); - if (ACPI_FAILURE(Status)) + if (ACPI_FAILURE(Status)) { + EcUnlock(sc); return_ACPI_STATUS (Status); + } /* Perform the transaction(s), based on width. */ for (i = 0; i < width; i += 8, EcAddr++) { -- 1.7.7.2