summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyeongJun An <sammiee5311@gmail.com>2026-09-02 21:50:58 +0900
committerTakashi Iwai <tiwai@suse.de>2026-09-02 15:30:14 +0200
commitf4a23e17d84fd2a152d9e12369761934e1af0ee8 (patch)
tree72e418d0860a5885a08c6eba3d32b67341e612be
parentadeee7187694719890aaffdc14b7e89cfd736f1d (diff)
downloadlinux-f4a23e17d84fd2a152d9e12369761934e1af0ee8.tar.gz
linux-f4a23e17d84fd2a152d9e12369761934e1af0ee8.zip
ALSA: rawmidi: Return the error from snd_rawmidi_input_params()
The snd_rawmidi_input_params() computes err for the three invalid mode combinations and for resize_runtime_buffer(), applies the new framing and clock type only when err is zero, and then returns 0 anyway. A caller that asked for parameters the kernel rejected is told the change succeeded, and the substream keeps its old buffer. The open_mutex conversion turned the early returns into assignments. It handled the output sibling correctly, which still returns err, and left this one behind. Fixes: 94b98194b62e ("ALSA: rawmidi: Take open_mutex around parameter changes") Cc: stable@vger.kernel.org Assisted-by: Claude:claude-opus-5 Signed-off-by: HyeongJun An <sammiee5311@gmail.com> Link: https://patch.msgid.link/20260902125058.19499-1-sammiee5311@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/core/rawmidi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/core/rawmidi.c b/sound/core/rawmidi.c
index 34b4c7d6dbe6..2617bb5b4faf 100644
--- a/sound/core/rawmidi.c
+++ b/sound/core/rawmidi.c
@@ -785,7 +785,7 @@ int snd_rawmidi_input_params(struct snd_rawmidi_substream *substream,
substream->framing = framing;
substream->clock_type = clock_type;
}
- return 0;
+ return err;
}
EXPORT_SYMBOL(snd_rawmidi_input_params);