mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-10-09 18:15:49 +00:00
ALSA: usb-audio: Fix uninitialized variable at __uac_clock_find_source()
The cur variable indicating the currently selected clock source can be theoretically used as uninitialized after the recent commit481f17c418("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:481f17c418("ALSA: usb-audio: Handle error for the current selector gracefully") Reported-by: Colin 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: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
bdaedca74d
commit
be22db77dc
1 changed files with 1 additions and 1 deletions
Loading…
Add table
Add a link
Reference in a new issue