clk: npcm7xx: Fix incorrect kfree
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>
Sat, 23 Sep 2023 13:31:27 +0000 (15:31 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Nov 2023 10:51:57 +0000 (11:51 +0100)
commit7d022726e3847cd2d73990b60c44ff8edff7fbb6
tree97a5e6757273009de58c780068f050c8ec2a87de
parentcc1c2772c1e186300ac032fe1703df6e24e2de61
clk: npcm7xx: Fix incorrect kfree

[ Upstream commit bbc5080bef4a245106aa8e8d424ba8847ca7c0ca ]

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: fcfd14369856 ("clk: npcm7xx: add clock controller")
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Link: https://lore.kernel.org/r/20230923133127.1815621-1-j.neuschaefer@gmx.net
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/clk-npcm7xx.c