Re: [PATCH] ALSA: usb-audio: simplify mixer control name handling
From: Takashi Iwai
Date: Tue May 05 2026 - 06:05:46 EST
On Mon, 04 May 2026 23:20:10 +0200,
Thorsten Blum wrote:
>
> In get_term_name(), remove hard-coded return values and a strlen() call,
> and return the number of bytes copied by strscpy() directly.
>
> Since get_term_name() may now return -E2BIG on string truncation, check
> name_len < 0 and return early from get_connector_control_name() if
> needed. Also replace strlcat() with strscpy().
>
> Other get_term_name() callers only check the return value for non-zero
> and are not affected by this change.
>
> Signed-off-by: Thorsten Blum <thorsten.blum@xxxxxxxxx>
Thanks, applied to for-next branch.
Takashi