summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/ec.c
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/acpi/ec.c
parentMerge branch 'acpi-hotplug' (diff)
parentACPI / EC: Ensure lock is acquired before accessing ec struct members (diff)
downloadlinux-dcaea2c18e43976477507c1bb5449278b4bf22b2.tar.xz
linux-dcaea2c18e43976477507c1bb5449278b4bf22b2.zip
Merge branch 'acpi-ec'
* acpi-ec: ACPI / EC: Ensure lock is acquired before accessing ec struct members
Diffstat (limited to 'drivers/acpi/ec.c')
-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) {