mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-09 15:29:16 +00:00
clk: tegra: Fix double-free in tegra_clk_init()
It's unlikely to happen in practice ever, but makes static checkers happy. Fixes: 535f296d47de ("clk: tegra: Add suspend and resume support on Tegra210") Reported-by: Stephen Boyd <sboyd@kernel.org> Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lkml.kernel.org/r/20191210020512.6088-1-digetx@gmail.com Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
This commit is contained in:
parent
67f96ff7c8
commit
fc666936f3
@ -231,8 +231,10 @@ struct clk ** __init tegra_clk_init(void __iomem *regs, int num, int banks)
|
||||
periph_banks = banks;
|
||||
|
||||
clks = kcalloc(num, sizeof(struct clk *), GFP_KERNEL);
|
||||
if (!clks)
|
||||
if (!clks) {
|
||||
kfree(periph_clk_enb_refcnt);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
clk_num = num;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user