diff options
author | Axel Lin <axel.lin@ingics.com> | 2014-12-11 06:10:44 +0300 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2015-01-19 11:56:07 +0300 |
commit | 8a66fdae771487762519db0546e9ccb648a2f911 (patch) | |
tree | e77ae8557a608c5114efa3709abb0c1dcf35a6f3 /drivers/mmc/host/toshsd.c | |
parent | 1818681cda4a1cd23a6c7582db2874b680fac6d4 (diff) | |
download | linux-8a66fdae771487762519db0546e9ccb648a2f911.tar.xz |
mmc: toshsd: Fix unbalanced locking
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>
Diffstat (limited to 'drivers/mmc/host/toshsd.c')
-rw-r--r-- | drivers/mmc/host/toshsd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mmc/host/toshsd.c b/drivers/mmc/host/toshsd.c index e5d8dec65f44..e2cdd5fb1423 100644 --- a/drivers/mmc/host/toshsd.c +++ b/drivers/mmc/host/toshsd.c @@ -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; |