Commit eac3e5b1 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Mathieu Poirier

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: c1407ac1 ("remoteproc: mtk_scp: Use devm variant of rproc_alloc()")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/1d15023b4afb94591435c48482fe1276411b9a07.1648981531.git.christophe.jaillet@wanadoo.frSigned-off-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
parent ce522ba9
...@@ -877,7 +877,6 @@ static int scp_remove(struct platform_device *pdev) ...@@ -877,7 +877,6 @@ static int scp_remove(struct platform_device *pdev)
for (i = 0; i < SCP_IPI_MAX; i++) for (i = 0; i < SCP_IPI_MAX; i++)
mutex_destroy(&scp->ipi_desc[i].lock); mutex_destroy(&scp->ipi_desc[i].lock);
mutex_destroy(&scp->send_lock); mutex_destroy(&scp->send_lock);
rproc_free(scp->rproc);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment