Skip to content
Snippets Groups Projects
Commit 962f1c8c authored by Ruliang Lin's avatar Ruliang Lin Committed by Greg Kroah-Hartman
Browse files

ALSA: caiaq: input: Add error handling for unsupported input methods in `snd_usb_caiaq_input_init`


[ 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: default avatarRuliang Lin <u202112092@hust.edu.cn>
Reviewed-by: default avatarDongliang Mu <dzm91@hust.edu.cn>
Acked-by: default avatarDaniel Mack <daniel@zonque.org>
Link: https://lore.kernel.org/r/20230504065054.3309-1-u202112092@hust.edu.cn


Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 13d67aa0
No related branches found
No related tags found
No related merge requests found
......@@ -808,6 +808,7 @@ int snd_usb_caiaq_input_init(struct snd_usb_caiaqdev *cdev)
default:
/* no input methods supported on this device */
ret = -EINVAL;
goto exit_free_idev;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment