]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ALSA: usb-audio: qcom: Fix return value in qc_usb_audio_offload_fill_avail_pcms
authorwangdicheng <wangdicheng@kylinos.cn>
Wed, 3 Jun 2026 09:11:01 +0000 (17:11 +0800)
committerTakashi Iwai <tiwai@suse.de>
Thu, 4 Jun 2026 08:15:09 +0000 (10:15 +0200)
commit9beb7dbbc567bb6ad7741140dd359d805734e664
tree37094ad00fb9adf9a155f74658f7f67174ce4d4d
parent537153aaafa94efe77efd566eada7dbab9fb76dd
ALSA: usb-audio: qcom: Fix return value in qc_usb_audio_offload_fill_avail_pcms

The function qc_usb_audio_offload_fill_avail_pcms() always returns -1
regardless of how many PCM devices were successfully filled. This makes
it impossible for callers to know the actual number of available PCMs.

Return the actual count of filled PCM devices instead, which allows
callers to verify that all expected PCMs were properly enumerated.

Signed-off-by: wangdicheng <wangdicheng@kylinos.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260603091102.231370-3-wangdich9700@163.com
sound/usb/qcom/qc_audio_offload.c