This is a note to let you know that I've just added the patch titled mailbox: mtk-cmdq: fix wrong use of sizeof in cmdq_get_clocks() to the 6.12-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: mailbox-mtk-cmdq-fix-wrong-use-of-sizeof-in-cmdq_get.patch and it can be found in the queue-6.12 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit e4a87ec87f3a59190b475867ec2c90f076815148 Author: Yang Yingliang <yangyingliang@xxxxxxxxxx> Date: Tue Oct 29 21:16:28 2024 +0800 mailbox: mtk-cmdq: fix wrong use of sizeof in cmdq_get_clocks() [ Upstream commit 271ee263cc8771982809185007181ca10346fe73 ] 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@xxxxxxxxxx> Signed-off-by: Jassi Brar <jassisinghbrar@xxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers/mailbox/mtk-cmdq-mailbox.c index 4bff73532085b..9c43ed9bdd37b 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;