* [PATCH] clk: ti: use kcalloc() instead of kzalloc()
@ 2024-12-30 5:28 Ethan Carter Edwards
2025-01-06 23:49 ` Stephen Boyd
0 siblings, 1 reply; 2+ messages in thread
From: Ethan Carter Edwards @ 2024-12-30 5:28 UTC (permalink / raw)
To: kristo
Cc: mturquette, sboyd, linux-omap, linux-clk, linux-kernel,
linux-hardening, kernel-hardening
Use 2-factor multiplication argument form kcalloc() instead
of kzalloc().
Link: https://github.com/KSPP/linux/issues/162
Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com>
---
drivers/clk/ti/mux.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/ti/mux.c b/drivers/clk/ti/mux.c
index 216d85d6aac6..f684fc306ecc 100644
--- a/drivers/clk/ti/mux.c
+++ b/drivers/clk/ti/mux.c
@@ -180,7 +180,7 @@ static void of_mux_clk_setup(struct device_node *node)
pr_err("mux-clock %pOFn must have parents\n", node);
return;
}
- parent_names = kzalloc((sizeof(char *) * num_parents), GFP_KERNEL);
+ parent_names = kcalloc(num_parents, sizeof(char *), GFP_KERNEL);
if (!parent_names)
goto cleanup;
--
2.47.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] clk: ti: use kcalloc() instead of kzalloc()
2024-12-30 5:28 [PATCH] clk: ti: use kcalloc() instead of kzalloc() Ethan Carter Edwards
@ 2025-01-06 23:49 ` Stephen Boyd
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2025-01-06 23:49 UTC (permalink / raw)
To: Ethan Carter Edwards, kristo
Cc: mturquette, linux-omap, linux-clk, linux-kernel, linux-hardening,
kernel-hardening
Quoting Ethan Carter Edwards (2024-12-29 21:28:58)
> Use 2-factor multiplication argument form kcalloc() instead
> of kzalloc().
>
> Link: https://github.com/KSPP/linux/issues/162
>
> Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com>
> ---
Applied to clk-next
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-01-07 0:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-30 5:28 [PATCH] clk: ti: use kcalloc() instead of kzalloc() Ethan Carter Edwards
2025-01-06 23:49 ` Stephen Boyd
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).