mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-24 09:50:04 +00:00
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>
This commit is contained in:
parent
1818681cda
commit
8a66fdae77
1 changed files with 3 additions and 1 deletions
|
@ -176,7 +176,8 @@ static irqreturn_t toshsd_thread_irq(int irq, void *dev_id)
|
||||||
spin_lock_irqsave(&host->lock, flags);
|
spin_lock_irqsave(&host->lock, flags);
|
||||||
|
|
||||||
if (!sg_miter_next(sg_miter))
|
if (!sg_miter_next(sg_miter))
|
||||||
return IRQ_HANDLED;
|
goto done;
|
||||||
|
|
||||||
buf = sg_miter->addr;
|
buf = sg_miter->addr;
|
||||||
|
|
||||||
/* Ensure we dont read more than one block. The chip will interrupt us
|
/* 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->consumed = count;
|
||||||
sg_miter_stop(sg_miter);
|
sg_miter_stop(sg_miter);
|
||||||
|
|
||||||
|
done:
|
||||||
spin_unlock_irqrestore(&host->lock, flags);
|
spin_unlock_irqrestore(&host->lock, flags);
|
||||||
|
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
|
|
Loading…
Reference in a new issue