alsactl: init() - return error value from snd_card_iterator_sinit() call

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2021-06-04 09:56:20 +02:00
parent d6d566a9ee
commit 511dd7a597

View file

@ -1751,6 +1751,8 @@ int init(const char *cfgdir, const char *filename, int flags, const char *cardna
sysfs_init(); sysfs_init();
err = snd_card_iterator_sinit(&iter, cardname); err = snd_card_iterator_sinit(&iter, cardname);
if (err < 0)
goto out;
while (snd_card_iterator_next(&iter)) { while (snd_card_iterator_next(&iter)) {
err = snd_card_clean_cfgdir(cfgdir, iter.card); err = snd_card_clean_cfgdir(cfgdir, iter.card);
if (err < 0) { if (err < 0) {