mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-31 22:25:35 -04:00
ucm: return error if boot_list is empty
If bootlist is empty, that means there is no BootSequence defined in the ucm for this sound card, let set_boot_user() return error, then alsactl could have chance to use non-ucm ways to initialize the sound card. BugLink: https://github.com/alsa-project/alsa-lib/pull/94 Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
64680bb398
commit
2368a95b8f
1 changed files with 2 additions and 0 deletions
|
|
@ -2252,6 +2252,8 @@ static int set_boot_user(snd_use_case_mgr_t *uc_mgr,
|
|||
uc_error("error: wrong value for _boot (%s)", value);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (list_empty(&uc_mgr->boot_list))
|
||||
return -ENOENT;
|
||||
err = execute_sequence(uc_mgr, &uc_mgr->boot_list,
|
||||
&uc_mgr->value_list, NULL, NULL);
|
||||
if (err < 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue