Commit 1efddcc9 authored by Julia Lawall's avatar Julia Lawall Committed by Takashi Iwai

sound: Add missing spin_unlock

Add a spin_unlock missing on the error path.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression E1;
@@

* spin_lock(E1,...);
  <+... when != E1
  if (...) {
    ... when != E1
*   return ...;
  }
  ...+>
* spin_unlock(E1,...);
// </smpl>
Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 4daf7a0c
...@@ -516,6 +516,7 @@ get the interrupt driven case to work efficiently */ ...@@ -516,6 +516,7 @@ get the interrupt driven case to work efficiently */
break; break;
if (i == 0x5000) { if (i == 0x5000) {
printk(KERN_ERR "au1000 AC97: AC97 command read timeout\n"); printk(KERN_ERR "au1000 AC97: AC97 command read timeout\n");
spin_unlock(&au1000->ac97_lock);
return 0; return 0;
} }
......
...@@ -1277,7 +1277,7 @@ static irqreturn_t AtaInterrupt(int irq, void *dummy) ...@@ -1277,7 +1277,7 @@ static irqreturn_t AtaInterrupt(int irq, void *dummy)
* (almost) like on the TT. * (almost) like on the TT.
*/ */
write_sq_ignore_int = 0; write_sq_ignore_int = 0;
return IRQ_HANDLED; goto out;
} }
if (!write_sq.active) { if (!write_sq.active) {
...@@ -1285,7 +1285,7 @@ static irqreturn_t AtaInterrupt(int irq, void *dummy) ...@@ -1285,7 +1285,7 @@ static irqreturn_t AtaInterrupt(int irq, void *dummy)
* the sq variables, so better don't do anything here. * the sq variables, so better don't do anything here.
*/ */
WAKE_UP(write_sq.sync_queue); WAKE_UP(write_sq.sync_queue);
return IRQ_HANDLED; goto out;
} }
/* Probably ;) one frame is finished. Well, in fact it may be that a /* Probably ;) one frame is finished. Well, in fact it may be that a
...@@ -1322,6 +1322,7 @@ static irqreturn_t AtaInterrupt(int irq, void *dummy) ...@@ -1322,6 +1322,7 @@ static irqreturn_t AtaInterrupt(int irq, void *dummy)
/* We are not playing after AtaPlay(), so there /* We are not playing after AtaPlay(), so there
is nothing to play any more. Wake up a process is nothing to play any more. Wake up a process
waiting for audio output to drain. */ waiting for audio output to drain. */
out:
spin_unlock(&dmasound.lock); spin_unlock(&dmasound.lock);
return IRQ_HANDLED; return IRQ_HANDLED;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment