From 773eeda110bcc91b1f0c7796810162c0b278edcf Mon Sep 17 00:00:00 2001 From: Takashi Sakamoto Date: Mon, 11 Jul 2016 21:06:01 +0900 Subject: pcm: set error code at failure path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit fixes below compiler warnings. pcm_hw.c: In function ‘_snd_pcm_hw_open’: pcm_hw.c:1816:16: warning: ‘err’ may be used uninitialized in this function [-Wmaybe-uninitialized] return err; ^ Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai --- src/pcm/pcm_hw.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pcm/pcm_hw.c b/src/pcm/pcm_hw.c index 4f4b84b2..1fe307f5 100644 --- a/src/pcm/pcm_hw.c +++ b/src/pcm/pcm_hw.c @@ -1769,6 +1769,7 @@ int _snd_pcm_hw_open(snd_pcm_t **pcmp, const char *name, chmap = _snd_pcm_parse_config_chmaps(n); if (!chmap) { SNDERR("Invalid channel map for %s", id); + err = -EINVAL; goto fail; } continue; -- cgit v1.2.1