From: Renu Tyagi Date: Tue, 23 Sep 2014 07:08:23 +0000 (+0200) Subject: pcm: return negative value in case of error X-Git-Tag: v1.0.29~28 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=f78ba070b38c0711308d14ce642e78bc2a1a8fc6;p=alsa-lib.git pcm: return negative value in case of error Signed-off-by: renu tyagi Signed-off-by: Takashi Iwai --- diff --git a/src/pcm/pcm.c b/src/pcm/pcm.c index 2e243382..4a7be6c1 100644 --- a/src/pcm/pcm.c +++ b/src/pcm/pcm.c @@ -2145,6 +2145,7 @@ static int snd_pcm_open_conf(snd_pcm_t **pcmp, const char *name, if (err >= 0) { if (snd_config_get_type(type_conf) != SND_CONFIG_TYPE_COMPOUND) { SNDERR("Invalid type for PCM type %s definition", str); + err = -EINVAL; goto _err; } snd_config_for_each(i, next, type_conf) {