Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c24e912b authored by Alexey Starikovskiy's avatar Alexey Starikovskiy Committed by Len Brown
Browse files

ACPI: ec: add unlock in error path

parent 636cedf9
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -280,9 +280,11 @@ 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 */
	acpi_enable_gpe(NULL, ec->gpe, ACPI_NOT_ISR);