mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-11 03:48:00 +00:00
clk: versatile-icst: fix memory leak
A static code checker found a memory leak in the Versatile ICST code. Fix it. Fixes: a183da637c52 "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…
x
Reference in New Issue
Block a user