Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7bdccef3 authored by Linus Walleij's avatar Linus Walleij Committed by Stephen Boyd
Browse files

clk: versatile-icst: fix memory leak



A static code checker found a memory leak in the Versatile
ICST code. Fix it.

Fixes: a183da63 "clk: versatile: respect parent rate in ICST clock"
Reported-by: default avatarStephen Boyd <sboyd@codeaurora.org>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
parent acba7855
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -157,8 +157,10 @@ struct clk *icst_clk_register(struct device *dev,
	icst->lockreg = base + desc->lock_offset;

	clk = clk_register(dev, &icst->hw);
	if (IS_ERR(clk))
	if (IS_ERR(clk)) {
		kfree(pclone);
		kfree(icst);
	}

	return clk;
}