提交 c7f23180 编写于 作者: S Sudip Mukherjee 提交者: Stephen Boyd

clk: shmobile: check for failure

We were not checking the return from devm_add_action() which can fail.
Start using the helper devm_add_action_or_reset() and return directly
as we know that the cleanup has been done by this helper.
Signed-off-by: NSudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
上级 706d5c73
...@@ -568,7 +568,11 @@ static int __init cpg_mssr_probe(struct platform_device *pdev) ...@@ -568,7 +568,11 @@ static int __init cpg_mssr_probe(struct platform_device *pdev)
if (error) if (error)
return error; return error;
devm_add_action(dev, cpg_mssr_del_clk_provider, np); error = devm_add_action_or_reset(dev,
cpg_mssr_del_clk_provider,
np);
if (error)
return error;
error = cpg_mssr_add_clk_domain(dev, info->core_pm_clks, error = cpg_mssr_add_clk_domain(dev, info->core_pm_clks,
info->num_core_pm_clks); info->num_core_pm_clks);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册