summaryrefslogtreecommitdiffstats
path: root/drivers/mailbox/mtk-cmdq-mailbox.c
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2024-10-29 14:16:28 +0100
committerJassi Brar <jassisinghbrar@gmail.com>2024-11-24 20:02:31 +0100
commit271ee263cc8771982809185007181ca10346fe73 (patch)
tree6c1c75b6e767ed65722cc14ec6828d8b399eb3dd /drivers/mailbox/mtk-cmdq-mailbox.c
parentdt-bindings: mailbox: qcom-ipcc: Add SM8750 (diff)
downloadlinux-271ee263cc8771982809185007181ca10346fe73.tar.xz
linux-271ee263cc8771982809185007181ca10346fe73.zip
mailbox: mtk-cmdq: fix wrong use of sizeof in cmdq_get_clocks()
It should be size of the struct clk_bulk_data, not data pointer pass to devm_kcalloc(). Fixes: aa1609f571ca ("mailbox: mtk-cmdq: Dynamically allocate clk_bulk_data structure") Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
Diffstat (limited to '')
-rw-r--r--drivers/mailbox/mtk-cmdq-mailbox.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers/mailbox/mtk-cmdq-mailbox.c
index 180906761eda..4324c53e372d 100644
--- a/drivers/mailbox/mtk-cmdq-mailbox.c
+++ b/drivers/mailbox/mtk-cmdq-mailbox.c
@@ -584,7 +584,7 @@ static int cmdq_get_clocks(struct device *dev, struct cmdq *cmdq)
struct clk_bulk_data *clks;
cmdq->clocks = devm_kcalloc(dev, cmdq->pdata->gce_num,
- sizeof(cmdq->clocks), GFP_KERNEL);
+ sizeof(*cmdq->clocks), GFP_KERNEL);
if (!cmdq->clocks)
return -ENOMEM;