提交 4141e744 编写于 作者: C Christophe Jaillet 提交者: Thierry Reding

drm/tegra: sor: No need to free devm_ allocated memory

Memory for the brick clock is allocated by devm_kzalloc(), so there is
no need here to free it explicitly.

The only function that calls tegra_clk_sor_brick_register() is the probe
function and it correctly checks and handles the return value, which, on
failure, will cause devm_ allocated memory to be freed automatically.
Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: NThierry Reding <treding@nvidia.com>
上级 87ba3e15
......@@ -349,8 +349,6 @@ static struct clk *tegra_clk_sor_brick_register(struct tegra_sor *sor,
brick->hw.init = &init;
clk = devm_clk_register(sor->dev, &brick->hw);
if (IS_ERR(clk))
kfree(brick);
return clk;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册