Skip to content

Commit f10997b

Browse files
lrgirdwolgirdwood
authored andcommitted
acp-dma: clear channel pointer after free on probe failure
On a partial channel-init failure the channel array was freed but the pointer was left set, so a later probe retry would free it again. Clear the pointer after freeing. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
1 parent e5b585c commit f10997b

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/drivers/amd/common/acp_dma.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ static int acp_dma_probe(struct dma *dma)
314314
sizeof(struct acp_dma_chan_data));
315315
if (!acp_dma_chan) {
316316
rfree(dma->chan);
317+
dma->chan = NULL;
317318
tr_err(&acpdma_tr, "acp-dma: %d channel %d private data alloc failed",
318319
dma->plat_data.id, channel);
319320
return -ENOMEM;

0 commit comments

Comments
 (0)