UCM: Fix deadlock following failed get _verb

When querying the current verb without a verb set, snd_use_case_get bails
out early without unlocking uc_mgr->mutex. This causes subsequent API calls
to hang. Instead, s/return/goto __end/.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Stephen Warren 2011-06-02 16:44:39 -06:00 committed by Jaroslav Kysela
parent 0a2fd2d386
commit 0a4b1ee746

View file

@ -1132,8 +1132,10 @@ int snd_use_case_get(snd_use_case_mgr_t *uc_mgr,
}
err = 0;
} else if (strcmp(identifier, "_verb") == 0) {
if (uc_mgr->active_verb == NULL)
return -ENOENT;
if (uc_mgr->active_verb == NULL) {
err = -ENOENT;
goto __end;
}
*value = strdup(uc_mgr->active_verb->name);
if (*value == NULL) {
err = -ENOMEM;