From 1dc331cc1746d3a24b4b93f2f5f43ca80cb100e4 Mon Sep 17 00:00:00 2001 From: Takashi Sakamoto Date: Wed, 16 Mar 2022 08:30:07 +0900 Subject: [PATCH] ctl: fix misfunction of alsactl_get_card_id_list() Even if instantiation of libudev enumerator is successful, alsactl_get_card_id_list() handles the success as failure. As a result, the function does not work at all. This commit fixes the bug. Fixes: bfe4b0589fc6 ("ctl/hwdep/rawmidi: fix uninitialized warning") Signed-off-by: Takashi Sakamoto --- src/ctl/query.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ctl/query.c b/src/ctl/query.c index cfaef2a..1430643 100644 --- a/src/ctl/query.c +++ b/src/ctl/query.c @@ -128,7 +128,7 @@ void alsactl_get_card_id_list(guint **entries, gsize *entry_count, g_return_if_fail(error == NULL || *error == NULL); prepare_udev_enum(&enumerator, error); - if (*error == NULL) + if (*error != NULL) return; entry_list = udev_enumerate_get_list_entry(enumerator); -- 2.47.3