Skip to content

Commit eac3e5b

Browse files
tititiou36mathieupoirier
authored andcommitted
remoteproc: mtk_scp: Fix a potential double free
'scp->rproc' is allocated using devm_rproc_alloc(), so there is no need to free it explicitly in the remove function. Fixes: c1407ac ("remoteproc: mtk_scp: Use devm variant of rproc_alloc()") Signed-off-by: Christophe JAILLET <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Link: https://lore.kernel.org/r/1d15023b4afb94591435c48482fe1276411b9a07.1648981531.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mathieu Poirier <[email protected]>
1 parent ce522ba commit eac3e5b

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

drivers/remoteproc/mtk_scp.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,6 @@ static int scp_remove(struct platform_device *pdev)
877877
for (i = 0; i < SCP_IPI_MAX; i++)
878878
mutex_destroy(&scp->ipi_desc[i].lock);
879879
mutex_destroy(&scp->send_lock);
880-
rproc_free(scp->rproc);
881880

882881
return 0;
883882
}

0 commit comments

Comments
 (0)