ucm: return always at least NULL if no list is available in snd_use_case_get_list()

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2019-11-29 22:28:26 +01:00
parent c79f09e1f5
commit 9baf64da2f

View file

@ -1160,8 +1160,10 @@ static int get_supcon_device_list(snd_use_case_mgr_t *uc_mgr,
modifier = find_modifier(uc_mgr, verb, name, 0);
if (modifier) {
if (modifier->dev_list.type != type)
if (modifier->dev_list.type != type) {
*list = NULL;
return 0;
}
return get_list(&modifier->dev_list.list, list,
struct dev_list_node, list,
name);
@ -1169,8 +1171,10 @@ static int get_supcon_device_list(snd_use_case_mgr_t *uc_mgr,
device = find_device(uc_mgr, verb, name, 0);
if (device) {
if (device->dev_list.type != type)
if (device->dev_list.type != type) {
*list = NULL;
return 0;
}
return get_list(&device->dev_list.list, list,
struct dev_list_node, list,
name);