clk: shmobile: Free 'clock' on error path
authorStephen Boyd <sboyd@codeaurora.org>
Thu, 25 Feb 2016 20:18:25 +0000 (12:18 -0800)
committerStephen Boyd <sboyd@codeaurora.org>
Thu, 25 Feb 2016 20:25:31 +0000 (12:25 -0800)
We forgot to free this clock when we return early in this code.

Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/shmobile/renesas-cpg-mssr.c

index 925b6007e531cd5afacc7b68dec1afa7444f7b0d..58e24b326a48bb810cfee9dfb519ea504409404d 100644 (file)
@@ -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
                }