ACPI: Don't unlock in lock's error path
authorStathis Kamperis <beket@dragonflybsd.org>
Sat, 10 Apr 2010 15:56:28 +0000 (18:56 +0300)
committerStathis Kamperis <beket@dragonflybsd.org>
Sat, 10 Apr 2010 16:13:41 +0000 (19:13 +0300)
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue1647>

Submitted-by: Edward O'Callaghan
sys/dev/acpica5/acpi_ec.c

index e14732e..39ebade 100644 (file)
@@ -619,7 +619,6 @@ 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;
@@ -764,7 +763,6 @@ EcSpaceHandler(UINT32 Function, ACPI_PHYSICAL_ADDRESS Address, UINT32 width,
     /* Serialize with EcGpeQueryHandler() at transaction granularity. */
     Status = EcLock(sc);
     if (ACPI_FAILURE(Status)) {
-       EcUnlock(sc);
        return_ACPI_STATUS (Status);
     }