* [PATCH] clk: npcm7xx: Fix incorrect kfree
@ 2023-09-23 13:31 Jonathan Neuschäfer
2023-10-19 1:06 ` Stephen Boyd
0 siblings, 1 reply; 2+ messages in thread
From: Jonathan Neuschäfer @ 2023-09-23 13:31 UTC (permalink / raw)
To: linux-clk
Cc: Jonathan Neuschäfer, Avi Fishman, Tomer Maimon, Tali Perry,
Patrick Venture, Nancy Yuen, Benjamin Fair, Michael Turquette,
Stephen Boyd, openbmc, linux-kernel
The corresponding allocation is:
> npcm7xx_clk_data = kzalloc(struct_size(npcm7xx_clk_data, hws,
> NPCM7XX_NUM_CLOCKS), GFP_KERNEL);
... so, kfree should be applied to npcm7xx_clk_data, not
npcm7xx_clk_data->hws.
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
---
drivers/clk/clk-npcm7xx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/clk-npcm7xx.c b/drivers/clk/clk-npcm7xx.c
index e319cfa51a8a3..030186def9c69 100644
--- a/drivers/clk/clk-npcm7xx.c
+++ b/drivers/clk/clk-npcm7xx.c
@@ -510,7 +510,7 @@ static void __init npcm7xx_clk_init(struct device_node *clk_np)
return;
npcm7xx_init_fail:
- kfree(npcm7xx_clk_data->hws);
+ kfree(npcm7xx_clk_data);
npcm7xx_init_np_err:
iounmap(clk_base);
npcm7xx_init_error:
--
2.40.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] clk: npcm7xx: Fix incorrect kfree
2023-09-23 13:31 [PATCH] clk: npcm7xx: Fix incorrect kfree Jonathan Neuschäfer
@ 2023-10-19 1:06 ` Stephen Boyd
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2023-10-19 1:06 UTC (permalink / raw)
To: Jonathan Neuschäfer, linux-clk
Cc: Jonathan Neuschäfer, Avi Fishman, Tomer Maimon, Tali Perry,
Patrick Venture, Nancy Yuen, Benjamin Fair, Michael Turquette,
openbmc, linux-kernel
Quoting Jonathan Neuschäfer (2023-09-23 06:31:27)
> The corresponding allocation is:
>
> > npcm7xx_clk_data = kzalloc(struct_size(npcm7xx_clk_data, hws,
> > NPCM7XX_NUM_CLOCKS), GFP_KERNEL);
>
> ... so, kfree should be applied to npcm7xx_clk_data, not
> npcm7xx_clk_data->hws.
>
> Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
> ---
Applied to clk-next
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-10-19 1:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-23 13:31 [PATCH] clk: npcm7xx: Fix incorrect kfree Jonathan Neuschäfer
2023-10-19 1:06 ` Stephen Boyd
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox