summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-11-19 01:06:06 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-11-19 01:06:06 +0100
commitdcaea2c18e43976477507c1bb5449278b4bf22b2 (patch)
treeb02f615347d179ba0c74afeaff467c8be70a5581 /drivers
parent614d7426ec109501e9e77be66963caf3041e566c (diff)
parent36b15875a7819a2ec4cb5748ff7096ad7bd86cbb (diff)
Merge branch 'acpi-ec'
* acpi-ec: ACPI / EC: Ensure lock is acquired before accessing ec struct members
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/ec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index d5309fd49458..ba5b56db9d27 100644
--- a/drivers/acpi/ec.c
+++ b/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) {