mmc: toshsd: Fix unbalanced locking
authorAxel Lin <axel.lin@ingics.com>
Thu, 11 Dec 2014 03:10:44 +0000 (11:10 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 19 Jan 2015 08:56:07 +0000 (09:56 +0100)
Fix returning IRQ_HANDLED with spin_lock held.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/toshsd.c

index e5d8dec65f4422645567d3e5fa9d1ea0db01e926..e2cdd5fb14237e28087348efe6cacfcf51932490 100644 (file)
@@ -176,7 +176,8 @@ static irqreturn_t toshsd_thread_irq(int irq, void *dev_id)
        spin_lock_irqsave(&host->lock, flags);
 
        if (!sg_miter_next(sg_miter))
-               return IRQ_HANDLED;
+               goto done;
+
        buf = sg_miter->addr;
 
        /* Ensure we dont read more than one block. The chip will interrupt us
@@ -198,6 +199,7 @@ static irqreturn_t toshsd_thread_irq(int irq, void *dev_id)
        sg_miter->consumed = count;
        sg_miter_stop(sg_miter);
 
+done:
        spin_unlock_irqrestore(&host->lock, flags);
 
        return IRQ_HANDLED;