Skip to content

Commit 7f67ba5

Browse files
chrisbainbridgebroonie
authored andcommitted
ASoC: amd: fix memory leak in acp3x pdm dma ops
Fixes: 4a767b1 ("ASoC: amd: add acp3x pdm driver dma ops") Signed-off-by: Chris Bainbridge <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 6e1e735 commit 7f67ba5

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

sound/soc/amd/renoir/acp3x-pdm-dma.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,11 @@ static int acp_pdm_dma_close(struct snd_soc_component *component,
301301
struct snd_pcm_substream *substream)
302302
{
303303
struct pdm_dev_data *adata = dev_get_drvdata(component->dev);
304+
struct pdm_stream_instance *rtd = substream->runtime->private_data;
304305

305306
disable_pdm_interrupts(adata->acp_base);
306307
adata->capture_stream = NULL;
308+
kfree(rtd);
307309
return 0;
308310
}
309311

0 commit comments

Comments
 (0)