Skip to content
Snippets Groups Projects
user avatar
Takashi Iwai authored
The cur variable indicating the currently selected clock source can be
theoretically used as uninitialized after the recent commit
481f17c4 ("ALSA: usb-audio: Handle error for the current selector
gracefully").  For addressing it, initialize it before use.

Also, one place seems setting 0 to a wrong variable ret, instead of
cur; otherwise it makes little sense.  Since the initialization is
done beforehand, we can get rid of this line, too.

Fixes: 481f17c4 ("ALSA: usb-audio: Handle error for the current selector gracefully")
Reported-by: default avatarColin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/4b261d68-f53f-240d-2d8a-2f88b337849d@canonical.com
Link: https://lore.kernel.org/r/s5hfsyhh97t.wl-tiwai@suse.de


Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
be22db77
Name Last commit Last update