diff options
author | Jonathan Neuschäfer <j.neuschaefer@gmx.net> | 2023-09-23 15:31:27 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-11-20 10:29:17 +0100 |
commit | 2305f7cc1f131c06ff9dc2d6fd528704c2c7aa36 (patch) | |
tree | e1e3fc0dba3f7aa21ed46d7f5a93525eed46f60d /drivers/clk | |
parent | 98065d0f71291777ae7f55aff9a55bc409114826 (diff) | |
download | linux-stable-2305f7cc1f131c06ff9dc2d6fd528704c2c7aa36.tar.gz linux-stable-2305f7cc1f131c06ff9dc2d6fd528704c2c7aa36.tar.bz2 linux-stable-2305f7cc1f131c06ff9dc2d6fd528704c2c7aa36.zip |
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>
Diffstat (limited to 'drivers/clk')
-rw-r--r-- | drivers/clk/clk-npcm7xx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/clk-npcm7xx.c b/drivers/clk/clk-npcm7xx.c index c5edf8f2fd19..f96e88310414 100644 --- a/drivers/clk/clk-npcm7xx.c +++ b/drivers/clk/clk-npcm7xx.c @@ -647,7 +647,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: |