mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
pcm: set error code at failure path
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 <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
671dc90486
commit
773eeda110
1 changed files with 1 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue