alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [patch] ASoC: AMD: free memory on error
@ 2016-01-13 12:20 Dan Carpenter
  2016-01-15 18:18 ` Applied "ASoC: AMD: free memory on error" to the asoc tree Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2016-01-13 12:20 UTC (permalink / raw)
  To: Liam Girdwood, Maruthi Srinivas Bayyavarapu
  Cc: alsa-devel, linux-kernel, kernel-janitors, Takashi Iwai,
	Mark Brown, Alex Deucher, Murali Krishna Vemuri, Guenter Roeck

Static checkers complain if we don't free "adata" before returning.

Fixes: 7c31335a03b6 ('ASoC: AMD: add AMD ASoC ACP 2.x DMA driver')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/sound/soc/amd/acp-pcm-dma.c b/sound/soc/amd/acp-pcm-dma.c
index 3191e0a..d1fb035 100644
--- a/sound/soc/amd/acp-pcm-dma.c
+++ b/sound/soc/amd/acp-pcm-dma.c
@@ -635,6 +635,7 @@ static int acp_dma_open(struct snd_pcm_substream *substream)
 					    SNDRV_PCM_HW_PARAM_PERIODS);
 	if (ret < 0) {
 		dev_err(prtd->platform->dev, "set integer constraint failed\n");
+		kfree(adata);
 		return ret;
 	}
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-15 18:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-13 12:20 [patch] ASoC: AMD: free memory on error Dan Carpenter
2016-01-15 18:18 ` Applied "ASoC: AMD: free memory on error" to the asoc tree Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).