diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-04-27 10:39:19 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-04-27 10:39:19 -0400 |
commit | 30e5f003ff4b2be86f71733b6c9b11355d66584c (patch) | |
tree | 25eea75c45b58c11bc301ea0c817f886387898d0 | |
parent | 07b0e5d49d227e3950cb13a3e8caf248ef2a310e (diff) |
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>
-rw-r--r-- | sound/pci/hda/hda_codec.c | 3 |
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, | |||
873 | struct hda_pcm *pcm; | 873 | struct hda_pcm *pcm; |
874 | va_list args; | 874 | va_list args; |
875 | 875 | ||
876 | va_start(args, fmt); | ||
877 | pcm = kzalloc(sizeof(*pcm), GFP_KERNEL); | 876 | pcm = kzalloc(sizeof(*pcm), GFP_KERNEL); |
878 | if (!pcm) | 877 | if (!pcm) |
879 | return NULL; | 878 | return NULL; |
880 | 879 | ||
881 | pcm->codec = codec; | 880 | pcm->codec = codec; |
882 | kref_init(&pcm->kref); | 881 | kref_init(&pcm->kref); |
882 | va_start(args, fmt); | ||
883 | pcm->name = kvasprintf(GFP_KERNEL, fmt, args); | 883 | pcm->name = kvasprintf(GFP_KERNEL, fmt, args); |
884 | va_end(args); | ||
884 | if (!pcm->name) { | 885 | if (!pcm->name) { |
885 | kfree(pcm); | 886 | kfree(pcm); |
886 | return NULL; | 887 | return NULL; |