summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>2016-02-23 09:30:03 (GMT)
committerStephen Boyd <sboyd@codeaurora.org>2016-02-24 23:01:42 (GMT)
commitc7f23180c6025fc93d1b743a49a97c4bb0c26f19 (patch)
treecf4030ae99b3c1c803cdddb9ee5d5231de98f9d6
parent706d5c73e3367e2b866a211d1bff2cedab772146 (diff)
downloadlinux-c7f23180c6025fc93d1b743a49a97c4bb0c26f19.tar.xz
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: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
-rw-r--r--drivers/clk/shmobile/renesas-cpg-mssr.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/clk/shmobile/renesas-cpg-mssr.c b/drivers/clk/shmobile/renesas-cpg-mssr.c
index 9a4d888..925b600 100644
--- a/drivers/clk/shmobile/renesas-cpg-mssr.c
+++ b/drivers/clk/shmobile/renesas-cpg-mssr.c
@@ -568,7 +568,11 @@ static int __init cpg_mssr_probe(struct platform_device *pdev)
if (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,
info->num_core_pm_clks);