Skip to content

Commit bbc5080

Browse files
neuschaeferbebarino
authored andcommitted
clk: npcm7xx: Fix incorrect kfree
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. Fixes: fcfd143 ("clk: npcm7xx: add clock controller") Signed-off-by: Jonathan Neuschäfer <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
1 parent 43a354a commit bbc5080

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/clk/clk-npcm7xx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ static void __init npcm7xx_clk_init(struct device_node *clk_np)
510510
return;
511511

512512
npcm7xx_init_fail:
513-
kfree(npcm7xx_clk_data->hws);
513+
kfree(npcm7xx_clk_data);
514514
npcm7xx_init_np_err:
515515
iounmap(clk_base);
516516
npcm7xx_init_error:

0 commit comments

Comments
 (0)