mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-04 13:30:08 -05:00
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:
parent
c79f09e1f5
commit
9baf64da2f
1 changed files with 6 additions and 2 deletions
|
|
@ -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);
|
modifier = find_modifier(uc_mgr, verb, name, 0);
|
||||||
if (modifier) {
|
if (modifier) {
|
||||||
if (modifier->dev_list.type != type)
|
if (modifier->dev_list.type != type) {
|
||||||
|
*list = NULL;
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
return get_list(&modifier->dev_list.list, list,
|
return get_list(&modifier->dev_list.list, list,
|
||||||
struct dev_list_node, list,
|
struct dev_list_node, list,
|
||||||
name);
|
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);
|
device = find_device(uc_mgr, verb, name, 0);
|
||||||
if (device) {
|
if (device) {
|
||||||
if (device->dev_list.type != type)
|
if (device->dev_list.type != type) {
|
||||||
|
*list = NULL;
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
return get_list(&device->dev_list.list, list,
|
return get_list(&device->dev_list.list, list,
|
||||||
struct dev_list_node, list,
|
struct dev_list_node, list,
|
||||||
name);
|
name);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue