public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH next] ALSA: rme32: Fix serialization in snd_rme32_capture_adat_open()
@ 2025-09-03  5:52 Dan Carpenter
  2025-09-03  7:22 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2025-09-03  5:52 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Jaroslav Kysela, Takashi Iwai, Philipp Stanner, Andy Shevchenko,
	linux-sound, linux-kernel, kernel-janitors

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")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 sound/pci/rme32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/pci/rme32.c b/sound/pci/rme32.c
index 123dddcb6972..ca9bbf554650 100644
--- a/sound/pci/rme32.c
+++ b/sound/pci/rme32.c
@@ -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;
 	}
 
-- 
2.47.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH next] ALSA: rme32: Fix serialization in snd_rme32_capture_adat_open()
  2025-09-03  5:52 [PATCH next] ALSA: rme32: Fix serialization in snd_rme32_capture_adat_open() Dan Carpenter
@ 2025-09-03  7:22 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2025-09-03  7:22 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Takashi Iwai, Jaroslav Kysela, Takashi Iwai, Philipp Stanner,
	Andy Shevchenko, linux-sound, linux-kernel, kernel-janitors

On Wed, 03 Sep 2025 07:52:24 +0200,
Dan Carpenter wrote:
> 
> 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")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>

Thanks, applied now.


Takashi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-09-03  7:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-03  5:52 [PATCH next] ALSA: rme32: Fix serialization in snd_rme32_capture_adat_open() Dan Carpenter
2025-09-03  7:22 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox