OSDN Git Service

ucm: fix uc_mgr_has_local_config()
authorJaroslav Kysela <perex@perex.cz>
Thu, 15 Apr 2021 09:49:32 +0000 (11:49 +0200)
committerJaroslav Kysela <perex@perex.cz>
Thu, 15 Apr 2021 09:49:32 +0000 (11:49 +0200)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/ucm/ucm_local.h

index 0c3f21e..79f1e87 100644 (file)
@@ -301,7 +301,8 @@ void uc_mgr_free(snd_use_case_mgr_t *uc_mgr);
 
 static inline int uc_mgr_has_local_config(snd_use_case_mgr_t *uc_mgr)
 {
-       return uc_mgr && snd_config_iterator_first(uc_mgr->local_config);
+       return uc_mgr && snd_config_iterator_first(uc_mgr->local_config) !=
+                        snd_config_iterator_end(uc_mgr->local_config);
 }
 
 int uc_mgr_card_open(snd_use_case_mgr_t *uc_mgr);