From: Jaroslav Kysela Date: Mon, 8 Jun 2020 07:57:27 +0000 (+0200) Subject: ucm: fix the wrong return value in uc_mgr_open_ctl() X-Git-Tag: v1.2.3~5 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=6fad36dd383913289c7f0cd44982c22d4e55f706;p=alsa-lib.git ucm: fix the wrong return value in uc_mgr_open_ctl() Signed-off-by: Jaroslav Kysela --- diff --git a/src/ucm/utils.c b/src/ucm/utils.c index ae101d45..fbced51a 100644 --- a/src/ucm/utils.c +++ b/src/ucm/utils.c @@ -274,7 +274,7 @@ int uc_mgr_open_ctl(snd_use_case_mgr_t *uc_mgr, if (err < 0 || id == NULL || id[0] == '\0') { uc_error("control hardware info (%s): %s", device, snd_strerror(err)); snd_ctl_close(ctl); - return err; + return err >= 0 ? -EINVAL : err; } /* insert to cache, if just name differs */