ALSA: synth: Save a few bytes of memory when registering a 'snd_emux'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 20 Jan 2024 09:42:12 +0000 (10:42 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 22 Jan 2024 12:04:22 +0000 (13:04 +0100)
commit1ac1b4b79bf51edcf4f25a1980334bd467880e7d
treeebc22722dec4e8aa8a48dfabbdd59073e0d0de01
parent1513664f340289cf10402753110f3cff12a738aa
ALSA: synth: Save a few bytes of memory when registering a 'snd_emux'

snd_emux_register() calls pass a string literal as the 'name' parameter.

So kstrdup_const() can be used instead of kfree() to avoid a memory
allocation in such cases.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/9e7b94c852a25ed4be5382e5e48a7dd77e8d4d1a.1705743706.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/sound/emux_synth.h
sound/synth/emux/emux.c