summaryrefslogtreecommitdiff
path: root/sound/soc/amd/acp-pcm-dma.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2016-01-13 15:20:02 +0300
committerMark Brown <broonie@kernel.org>2016-01-13 12:32:04 +0000
commitcde6bcd584b1b910d6ee8d6eb968ea5d20815444 (patch)
tree1a34b47bd577f6fe432c487df1386d4a5c997f18 /sound/soc/amd/acp-pcm-dma.c
parent7cb1dc810935fbf82ad06007dc7fb08d93c1e59f (diff)
ASoC: AMD: free memory on error
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> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/amd/acp-pcm-dma.c')
-rw-r--r--sound/soc/amd/acp-pcm-dma.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/amd/acp-pcm-dma.c b/sound/soc/amd/acp-pcm-dma.c
index 3191e0a7d273..d1fb035f44db 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;
}