Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c7f23180 authored by Sudip Mukherjee's avatar Sudip Mukherjee Committed by Stephen Boyd
Browse files

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: default avatarSudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
parent 706d5c73
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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);