clk: versatile-icst: fix memory leak
A static code checker found a memory leak in the Versatile
ICST code. Fix it.
Fixes: a183da637c
"clk: versatile: respect parent rate in ICST clock"
Reported-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
This commit is contained in:
parent
acba7855dd
commit
7bdccef34f
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue