Re: [PATCH v5] ALSA: control: Fix parsing of numeric fields

From: Takashi Iwai

Date: Tue Nov 10 2026 - 05:40:39 EST


On Mon, 09 Nov 2026 17:35:31 +0100,
Sreeraj S Kurup wrote:
>
> parse_uint() passes the remaining input string to kstrtoull().
>
> When the input contains comma-separated fields, the string
> contains both the numeric value and the following fields.
>
> For example, with:
>
> device=1,subdevice=0,name=Master
>
> kstrtoull() receives "1,subdevice=0,name=Master" and fails
> to parse the numeric value.
>
> Stop parsing at the next comma and pass only the numeric
> field to kstrtouint().
>
> Make all parse_*() functions return the end of the current
> substring, leaving delimiter handling to set_led_id().
> Temporarily terminate the numeric substring in parse_uint()
> before calling kstrtouint().
>
> This allows numeric fields to be parsed correctly in
> comma-separated input.
>
> Fixes: a135dfb5de15 ("ALSA: led control - add sysfs kcontrol LED marking layer")
> Signed-off-by: Sreeraj S Kurup <sreekuttan2156239@xxxxxxxxx>

Applied to for-next branch now. Thanks.


Takashi