ASoC: AMD: free memory on error

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

Fixes: 7c31335a03 ('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>
This commit is contained in:
Dan Carpenter 2016-01-13 15:20:02 +03:00 committed by Mark Brown
parent 7cb1dc8109
commit cde6bcd584
1 changed files with 1 additions and 0 deletions

View File

@ -635,6 +635,7 @@ static int acp_dma_open(struct snd_pcm_substream *substream)
SNDRV_PCM_HW_PARAM_PERIODS); SNDRV_PCM_HW_PARAM_PERIODS);
if (ret < 0) { if (ret < 0) {
dev_err(prtd->platform->dev, "set integer constraint failed\n"); dev_err(prtd->platform->dev, "set integer constraint failed\n");
kfree(adata);
return ret; return ret;
} }