Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Dan Carpenter and committed by
Mark Brown
cde6bcd5 7cb1dc81

+1
+1
sound/soc/amd/acp-pcm-dma.c
··· 635 635 SNDRV_PCM_HW_PARAM_PERIODS); 636 636 if (ret < 0) { 637 637 dev_err(prtd->platform->dev, "set integer constraint failed\n"); 638 + kfree(adata); 638 639 return ret; 639 640 } 640 641