Commit 4da96175 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Mathieu Poirier

remoteproc: imx_rproc: Fix a resource leak in the remove function

'priv->workqueue' is destroyed in the error handling path of the probe but
not in the remove function.

Add the missing call to release some resources.

Cc: stable <stable@vger.kernel.org>
Fixes: 2df70620 ("remoteproc: imx_proc: enable virtio/mailbox")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: default avatarPeng Fan <peng.fan@nxp.com>
Tested-by: default avatarPeng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/d28ca94a4031bd7297d47c2164e18885a5a6ec19.1634366546.git.christophe.jaillet@wanadoo.frSigned-off-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
parent 7efb1425
......@@ -804,6 +804,7 @@ static int imx_rproc_remove(struct platform_device *pdev)
clk_disable_unprepare(priv->clk);
rproc_del(rproc);
imx_rproc_free_mbox(rproc);
destroy_workqueue(priv->workqueue);
rproc_free(rproc);
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