clk: shmobile: Free 'clock' on error path
PATCH 1/1 clk: shmobile: Free 'clock' on error path
We forgot to free this clock when we return early in this code.
--- drivers/clk/shmobile/renesas-cpg-mssr.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/shmobile/renesas-cpg-mssr.c +1 -0
@@ -348,6 +348,7 @@ static void __init cpg_mssr_register_mod_clk(const struct mssr_mod_clk *mod,#else dev_dbg (dev,"Ignoring MSTP %s to prevent disabling\n" , mod->name); +kfree (clock);return ;#endif }
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Hi Stephen,
Quoted 4 lines · Stephen Boyd
We forgot to free this clock when we return early in this code.
Cc Geert Uytterhoeven <[email protected]>Signed-off-by Stephen Boyd <[email protected]>
Quoted 9 lines
--- drivers/clk/shmobile/renesas-cpg-mssr.c | 1 + 1 file changed, 1 insertion(+)drivers/clk/shmobile/renesas-cpg-mssr.c +0
-0
drivers/clk/shmobile/renesas-cpg-mssr.c static void __init cpg_mssr_register_mod_clk(const struct mssr_mod_clk *mod, · line 353
Quoted 6 lines
drivers/clk/shmobile/renesas-cpg-mssr.c +1
-0@@ -348,6 +348,7 @@ static void __init cpg_mssr_register_mod_clk(const struct mssr_mod_clk *mod,#else dev_dbg (dev,"Ignoring MSTP %s to prevent disabling\n" , mod->name); +kfree (clock);return ;#endif
I had hoped for the whole "#else /* !CLK_ENABLE_HAND_OFF */" branch to be removed before anyone would start to fix silly issues like this ;-)
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds