diff mbox series

ALSA: echoaudio: re-enable IRQs on failure path

Message ID 20200713105324.GB251988@mwanda (mailing list archive)
State New, archived
Headers show
Series ALSA: echoaudio: re-enable IRQs on failure path | expand

Commit Message

Dan Carpenter July 13, 2020, 10:53 a.m. UTC
This should be spin_unlock_irq() instead of spin_lock().

Fixes: 6c3312544873 ("ALSA: echoaudio: Prevent races in calls to set_audio_format()")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 sound/pci/echoaudio/echoaudio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Takashi Iwai July 13, 2020, 4:05 p.m. UTC | #1
On Mon, 13 Jul 2020 12:53:24 +0200,
Dan Carpenter wrote:
> 
> This should be spin_unlock_irq() instead of spin_lock().
> 
> Fixes: 6c3312544873 ("ALSA: echoaudio: Prevent races in calls to set_audio_format()")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Thanks, applied now.


Takashi
diff mbox series

Patch

diff --git a/sound/pci/echoaudio/echoaudio.c b/sound/pci/echoaudio/echoaudio.c
index e81f42811f45..6aeb99aa2414 100644
--- a/sound/pci/echoaudio/echoaudio.c
+++ b/sound/pci/echoaudio/echoaudio.c
@@ -721,7 +721,7 @@  static int pcm_prepare(struct snd_pcm_substream *substream)
 	spin_lock_irq(&chip->lock);
 
 	if (snd_BUG_ON(!is_pipe_allocated(chip, pipe_index))) {
-		spin_unlock(&chip->lock);
+		spin_unlock_irq(&chip->lock);
 		return -EINVAL;
 	}