control: return negative value in case of error

Signed-off-by: renu tyagi <renu.tyagi@samsung.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Renu Tyagi 2014-09-23 09:08:09 +02:00 committed by Takashi Iwai
parent b356cd29f9
commit 5a0b992548

View file

@ -864,6 +864,7 @@ static int snd_ctl_open_conf(snd_ctl_t **ctlp, const char *name,
if (err >= 0) {
if (snd_config_get_type(type_conf) != SND_CONFIG_TYPE_COMPOUND) {
SNDERR("Invalid type for CTL type %s definition", str);
err = -EINVAL;
goto _err;
}
snd_config_for_each(i, next, type_conf) {