Skip to contentSkip to conversation

ALSA: rme32: Fix serialization in snd_rme32_capture_adat_open()

PATCH Applied Dan Carpenter 2 participants 2 messages Sep 3, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: rme32: Fix serialization in snd_rme32_capture_adat_open()

We accidentally deleted the wrong line of code when we did the conversion to guard() locks. If the rme32->capture_substream has already been set we should return -EBUSY.

Fixes 8bb75ae244c5 ("ALSA: rme32: Use guard() for spin locks")
---
 sound/pci/rme32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/rme32.c +1 -1
index 123dddcb6972..ca9bbf554650 100644
@@ -936,7 +936,7 @@ snd_rme32_capture_adat_open(struct snd_pcm_substream *substream)
         
 	scoped_guard(spinlock_irq, &rme32->lock) {
 		if (rme32->capture_substream != NULL)
-			spin_unlock_irq(&rme32->lock);
+			return -EBUSY;
 		rme32->capture_substream = substream;
 	}
 
Signature · 1 line
2.47.2
Applied
#1 lore raw
Quoted 7 lines · Dan Carpenter

We accidentally deleted the wrong line of code when we did the conversion to guard() locks. If the rme32->capture_substream has already been set we should return -EBUSY.

Fixes 8bb75ae244c5 ("ALSA: rme32: Use guard() for spin locks")

Thanks, applied now.

Takashi