mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
ALSA: usb-audio: simplify mixer control name handling
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@linux.dev> Link: https://patch.msgid.link/20260504212008.147373-4-thorsten.blum@linux.dev Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
1ac8867734
commit
86dc52c5c9
1 changed files with 16 additions and 25 deletions
Loading…
Add table
Add a link
Reference in a new issue