[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181217150217.32435-14-thierry.reding@gmail.com>
Date: Mon, 17 Dec 2018 16:02:11 +0100
From: Thierry Reding <thierry.reding@...il.com>
To: Jassi Brar <jassisinghbrar@...il.com>
Cc: linux-kernel@...r.kernel.org,
Houlong Wei <houlong.wei@...iatek.com>,
HS Liao <hs.liao@...iatek.com>, CK Hu <ck.hu@...iatek.com>
Subject: [PATCH v2 13/19] mailbox: mtk-cmdq: Remove needless devm_kfree() calls
From: Thierry Reding <treding@...dia.com>
Memory allocated through device-managed functions doesn't need to be
explicitly freed, so these calls can be removed.
Cc: Houlong Wei <houlong.wei@...iatek.com>
Cc: HS Liao <hs.liao@...iatek.com>
Cc: CK Hu <ck.hu@...iatek.com>
Signed-off-by: Thierry Reding <treding@...dia.com>
---
drivers/mailbox/mtk-cmdq-mailbox.c | 8 --------
1 file changed, 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;
}
--
2.19.1
Powered by blists - more mailing lists