Browse Source

Merge branch 'acpi-ec'

* acpi-ec:
  ACPI / EC: Ensure lock is acquired before accessing ec struct members
Rafael J. Wysocki 11 years ago
parent
commit
dcaea2c18e
1 changed files with 2 additions and 1 deletions
  1. 2 1
      drivers/acpi/ec.c

+ 2 - 1
drivers/acpi/ec.c

@@ -173,9 +173,10 @@ static void start_transaction(struct acpi_ec *ec)
 static void advance_transaction(struct acpi_ec *ec, u8 status)
 {
 	unsigned long flags;
-	struct transaction *t = ec->curr;
+	struct transaction *t;
 
 	spin_lock_irqsave(&ec->lock, flags);
+	t = ec->curr;
 	if (!t)
 		goto unlock;
 	if (t->wlen > t->wi) {