Re: [PATCH] ALSA: rawmidi: Return the error from snd_rawmidi_input_params()
From: Takashi Iwai
Date: Wed Sep 02 2026 - 09:44:30 EST
On Wed, 02 Sep 2026 14:50:58 +0200,
HyeongJun An wrote:
>
> 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@xxxxxxxxxxxxxxx
> Assisted-by: Claude:claude-opus-5
> Signed-off-by: HyeongJun An <sammiee5311@xxxxxxxxx>
Applied now. Thanks.
Takashi