summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-04-27 16:39:19 +0200
committerTakashi Iwai <tiwai@suse.de>2015-04-27 16:39:19 +0200
commit30e5f003ff4b2be86f71733b6c9b11355d66584c (patch)
tree25eea75c45b58c11bc301ea0c817f886387898d0 /sound
parent07b0e5d49d227e3950cb13a3e8caf248ef2a310e (diff)
downloadlinux-stable-30e5f003ff4b2be86f71733b6c9b11355d66584c.tar.gz
linux-stable-30e5f003ff4b2be86f71733b6c9b11355d66584c.tar.bz2
linux-stable-30e5f003ff4b2be86f71733b6c9b11355d66584c.zip
ALSA: hda - Fix missing va_end() call in snd_hda_codec_pcm_new()
Reported by coverity CID 1296024. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/hda_codec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 27333e0d8ebe..b49feff0a319 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -873,14 +873,15 @@ struct hda_pcm *snd_hda_codec_pcm_new(struct hda_codec *codec,
struct hda_pcm *pcm;
va_list args;
- va_start(args, fmt);
pcm = kzalloc(sizeof(*pcm), GFP_KERNEL);
if (!pcm)
return NULL;
pcm->codec = codec;
kref_init(&pcm->kref);
+ va_start(args, fmt);
pcm->name = kvasprintf(GFP_KERNEL, fmt, args);
+ va_end(args);
if (!pcm->name) {
kfree(pcm);
return NULL;