Re: [PATCH v2] ALSA: control: Trim whitespace from sysfs input
From: Takashi Iwai
Date: Sat Nov 07 2026 - 04:04:02 EST
On Fri, 06 Nov 2026 18:26:25 +0100,
Sreeraj S Kurup wrote:
>
> The attach and detach sysfs interfaces receive input from
> userspace.
>
> When userspace writes a value using echo, the input normally
> ends with a newline character.
>
> The parser does not remove this newline in all input formats.
> For example, a bare numeric ID can be treated as a control name,
> and an unquoted name= field can include the newline.
>
> Trim leading and trailing whitespace before parsing the input.
>
> This keeps spaces inside mixer control names unchanged.
>
> Fixes: a135dfb5de15 ("ALSA: led control - add sysfs kcontrol LED marking layer")
> Signed-off-by: Sreeraj S Kurup <sreekuttan2156239@xxxxxxxxx>
Applied to for-next branch. Thanks.
Takashi