ALSA: control_led - fix initialization in the mode show callback
authorJaroslav Kysela <perex@perex.cz>
Mon, 14 Jun 2021 07:17:10 +0000 (09:17 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 14 Jun 2021 07:50:34 +0000 (09:50 +0200)
commite381a14c3e3a4e90e293d4eaa5a3ab8ae98b9973
tree45e543b95cc3a0b995ecb7bfe59c04930d0007ad
parent12c11ba5be833391ec73d33de0360aacd9473569
ALSA: control_led - fix initialization in the mode show callback

The str variable should be always initialized before use even if
the switch covers all cases. This is a minimalistic fix: Assign NULL,
the sprintf() may print '(null)' if something is corrupted.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20210614071710.1786866-1-perex@perex.cz
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/control_led.c