Commit b7a7943f authored by Tero Kristo's avatar Tero Kristo Committed by Stephen Boyd
Browse files

clk: ti: clockdomain: fix static checker warning



Fix a memory leak induced by not calling clk_put after doing of_clk_get.

Reported-by: default avatarDan Murphy <dmurphy@ti.com>
Signed-off-by: default avatarTero Kristo <t-kristo@ti.com>
Link: https://lore.kernel.org/r/20200907082600.454-3-t-kristo@ti.com


Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent cec4a609
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -148,10 +148,12 @@ static void __init of_ti_clockdomain_setup(struct device_node *node)
		if (!omap2_clk_is_hw_omap(clk_hw)) {
			pr_warn("can't setup clkdm for basic clk %s\n",
				__clk_get_name(clk));
			clk_put(clk);
			continue;
		}
		to_clk_hw_omap(clk_hw)->clkdm_name = clkdm_name;
		omap2_init_clk_clkdm(clk_hw);
		clk_put(clk);
	}
}