You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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:
committed by
Stephen Boyd
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user