ALSA: usb-audio: Initialize status1 to fix uninitialized symbol errors
Initialize 'status1' with a default value to resolve the static analysis smatch reported error "uninitialized symbol 'status1'". The 'status1' variable is used to create a buff using "kmemdup". So, ensure to initialize the value before it is read. Suggested-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: HariKrishna Sagala <hariconscious@gmail.com> Link: https://patch.msgid.link/20251204052201.16286-3-hariconscious@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>master
parent
210d77cca3
commit
d740d52e34
|
|
@ -2545,6 +2545,7 @@ static int snd_rme_get_status1(struct snd_kcontrol *kcontrol,
|
|||
struct usb_mixer_elem_list *list = snd_kcontrol_chip(kcontrol);
|
||||
struct snd_usb_audio *chip = list->mixer->chip;
|
||||
|
||||
*status1 = 0;
|
||||
CLASS(snd_usb_lock, pm)(chip);
|
||||
if (pm.err < 0)
|
||||
return pm.err;
|
||||
|
|
|
|||
Loading…
Reference in New Issue