* [PATCH] ASoC: imx-card: Adjust over allocation of memory in imx_card_parse_of()
@ 2025-04-06 21:08 Chenyuan Yang
2025-04-14 13:56 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Chenyuan Yang @ 2025-04-06 21:08 UTC (permalink / raw)
To: shengjiu.wang, Xiubo.Lee, festevam, nicoleotsuka, lgirdwood,
broonie, perex, tiwai, shawnguo, s.hauer, kernel
Cc: linux-sound, linuxppc-dev, imx, linux-arm-kernel, linux-kernel,
Chenyuan Yang
Incorrect types are used as sizeof() arguments in devm_kcalloc().
It should be sizeof(dai_link_data) for link_data instead of
sizeof(snd_soc_dai_link).
This is found by our static analysis tool.
Signed-off-by: Chenyuan Yang <chenyuan0y@gmail.com>
---
sound/soc/fsl/imx-card.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/fsl/imx-card.c b/sound/soc/fsl/imx-card.c
index 3686d468506b..45e000f61ecc 100644
--- a/sound/soc/fsl/imx-card.c
+++ b/sound/soc/fsl/imx-card.c
@@ -544,7 +544,7 @@ static int imx_card_parse_of(struct imx_card_data *data)
if (!card->dai_link)
return -ENOMEM;
- data->link_data = devm_kcalloc(dev, num_links, sizeof(*link), GFP_KERNEL);
+ data->link_data = devm_kcalloc(dev, num_links, sizeof(*link_data), GFP_KERNEL);
if (!data->link_data)
return -ENOMEM;
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: imx-card: Adjust over allocation of memory in imx_card_parse_of()
2025-04-06 21:08 [PATCH] ASoC: imx-card: Adjust over allocation of memory in imx_card_parse_of() Chenyuan Yang
@ 2025-04-14 13:56 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2025-04-14 13:56 UTC (permalink / raw)
To: shengjiu.wang, Xiubo.Lee, festevam, nicoleotsuka, lgirdwood,
perex, tiwai, shawnguo, s.hauer, kernel, Chenyuan Yang
Cc: linux-sound, linuxppc-dev, imx, linux-arm-kernel, linux-kernel
On Sun, 06 Apr 2025 16:08:54 -0500, Chenyuan Yang wrote:
> Incorrect types are used as sizeof() arguments in devm_kcalloc().
> It should be sizeof(dai_link_data) for link_data instead of
> sizeof(snd_soc_dai_link).
>
> This is found by our static analysis tool.
>
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: imx-card: Adjust over allocation of memory in imx_card_parse_of()
commit: a9a69c3b38c89d7992fb53db4abb19104b531d32
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-04-14 13:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-06 21:08 [PATCH] ASoC: imx-card: Adjust over allocation of memory in imx_card_parse_of() Chenyuan Yang
2025-04-14 13:56 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®