From 511dd7a597735048f3883ef7883adf853ac2de4a Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Fri, 4 Jun 2021 09:56:20 +0200 Subject: [PATCH] alsactl: init() - return error value from snd_card_iterator_sinit() call Signed-off-by: Jaroslav Kysela --- alsactl/init_parse.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/alsactl/init_parse.c b/alsactl/init_parse.c index 9d0f473..e439de7 100644 --- a/alsactl/init_parse.c +++ b/alsactl/init_parse.c @@ -1751,6 +1751,8 @@ int init(const char *cfgdir, const char *filename, int flags, const char *cardna sysfs_init(); err = snd_card_iterator_sinit(&iter, cardname); + if (err < 0) + goto out; while (snd_card_iterator_next(&iter)) { err = snd_card_clean_cfgdir(cfgdir, iter.card); if (err < 0) {