ALSA: caiaq: input: Add error handling for unsupported input methods in `snd_usb_caiaq_input_init`
stable inclusion from stable-v5.10.180 commit 0f1ad0ef60cc07d94256a39b0c594c0cd94f1716 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8FC2O Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=0f1ad0ef60cc07d94256a39b0c594c0cd94f1716 -------------------------------- [ Upstream commit 0d727e18 ] Smatch complains that: snd_usb_caiaq_input_init() warn: missing error code 'ret' This patch adds a new case to handle the situation where the device does not support any input methods in the `snd_usb_caiaq_input_init` function. It returns an `-EINVAL` error code to indicate that no input methods are supported on the device. Fixes: 523f1dce ("[ALSA] Add Native Instrument usb audio device support") Signed-off-by:Ruliang Lin <u202112092@hust.edu.cn> Reviewed-by:
Dongliang Mu <dzm91@hust.edu.cn> Acked-by:
Daniel Mack <daniel@zonque.org> Link: https://lore.kernel.org/r/20230504065054.3309-1-u202112092@hust.edu.cn Signed-off-by:
Takashi Iwai <tiwai@suse.de> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
sanglipeng <sanglipeng1@jd.com>
Loading
Please sign in to comment