summaryrefslogtreecommitdiffstats
path: root/drivers/mailbox/mtk-cmdq-mailbox.c
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2018-12-20 18:19:56 +0100
committerJassi Brar <jaswinder.singh@linaro.org>2018-12-21 23:49:25 +0100
commitec1c674f0ae3905cd540ab2f30d9c4265981d7b4 (patch)
tree6596cf9404c8ddcf03494626d2f3f0da14e4f849 /drivers/mailbox/mtk-cmdq-mailbox.c
parentmailbox: mtk-cmdq: Use device-managed registration API (diff)
downloadlinux-ec1c674f0ae3905cd540ab2f30d9c4265981d7b4.tar.xz
linux-ec1c674f0ae3905cd540ab2f30d9c4265981d7b4.zip
mailbox: mtk-cmdq: Remove needless devm_kfree() calls
Memory allocated through device-managed functions doesn't need to be explicitly freed, so these calls can be removed. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Diffstat (limited to 'drivers/mailbox/mtk-cmdq-mailbox.c')
-rw-r--r--drivers/mailbox/mtk-cmdq-mailbox.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers/mailbox/mtk-cmdq-mailbox.c
index d9c3ec3667a8..22811784dc7d 100644
--- a/drivers/mailbox/mtk-cmdq-mailbox.c
+++ b/drivers/mailbox/mtk-cmdq-mailbox.c
@@ -339,14 +339,6 @@ static int cmdq_remove(struct platform_device *pdev)
clk_unprepare(cmdq->clock);
- if (cmdq->mbox.chans)
- devm_kfree(&pdev->dev, cmdq->mbox.chans);
-
- if (cmdq->thread)
- devm_kfree(&pdev->dev, cmdq->thread);
-
- devm_kfree(&pdev->dev, cmdq);
-
return 0;
}