aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/ec.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-11-18 19:06:06 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-11-18 19:06:06 -0500
commitdcaea2c18e43976477507c1bb5449278b4bf22b2 (patch)
treeb02f615347d179ba0c74afeaff467c8be70a5581 /drivers/acpi/ec.c
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/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)
173static void advance_transaction(struct acpi_ec *ec, u8 status) 173static void advance_transaction(struct acpi_ec *ec, u8 status)
174{ 174{
175 unsigned long flags; 175 unsigned long flags;
176 struct transaction *t = ec->curr; 176 struct transaction *t;
177 177
178 spin_lock_irqsave(&ec->lock, flags); 178 spin_lock_irqsave(&ec->lock, flags);
179 t = ec->curr;
179 if (!t) 180 if (!t)
180 goto unlock; 181 goto unlock;
181 if (t->wlen > t->wi) { 182 if (t->wlen > t->wi) {