* [PATCH] clk: shmobile: check for failure
@ 2016-02-23 9:30 Sudip Mukherjee
2016-02-24 23:03 ` Stephen Boyd
0 siblings, 1 reply; 2+ messages in thread
From: Sudip Mukherjee @ 2016-02-23 9:30 UTC (permalink / raw)
To: Michael Turquette, Stephen Boyd; +Cc: linux-kernel, linux-clk, Sudip Mukherjee
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>
---
I think this will go throuh clk tree, so this doesnot have to wait as
devm_add_action_or_reset() is already in clk tree.
drivers/clk/shmobile/renesas-cpg-mssr.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
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);
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] clk: shmobile: check for failure
2016-02-23 9:30 [PATCH] clk: shmobile: check for failure Sudip Mukherjee
@ 2016-02-24 23:03 ` Stephen Boyd
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2016-02-24 23:03 UTC (permalink / raw)
To: Sudip Mukherjee; +Cc: Michael Turquette, linux-kernel, linux-clk
On 02/23, Sudip Mukherjee wrote:
> 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>
> ---
Applied to clk-next.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-02-24 23:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-23 9:30 [PATCH] clk: shmobile: check for failure Sudip Mukherjee
2016-02-24 23:03 ` Stephen Boyd
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).