]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: caiaq: input: Add error handling for unsupported input methods in `snd_usb_caia...
authorRuliang Lin <u202112092@hust.edu.cn>
Thu, 4 May 2023 06:50:53 +0000 (14:50 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 May 2023 09:35:59 +0000 (11:35 +0200)
commit83cbd02cb2ccf6e48066c8901d23490f58df0b5c
treead29463f5bef377d5b063845bbdbe89fedf778ad
parent6925d10d96901c349979238d8f039abba58dcc85
ALSA: caiaq: input: Add error handling for unsupported input methods in `snd_usb_caiaq_input_init`

[ Upstream commit 0d727e1856ef22dd9337199430258cb64cbbc658 ]

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: a59ce4465ca7 ("[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>
sound/usb/caiaq/input.c