if (ret)
return ret;
- devm_add_action(dev, qcom_cc_del_clk_provider, pdev->dev.of_node);
+ ret = devm_add_action_or_reset(dev, qcom_cc_del_clk_provider,
+ pdev->dev.of_node);
+
+ if (ret)
+ return ret;
reset = &cc->reset;
reset->rcdev.of_node = dev->of_node;
if (ret)
return ret;
- devm_add_action(dev, qcom_cc_reset_unregister, &reset->rcdev);
+ ret = devm_add_action_or_reset(dev, qcom_cc_reset_unregister,
+ &reset->rcdev);
+
+ if (ret)
+ return ret;
if (desc->gdscs && desc->num_gdscs) {
ret = gdsc_register(dev, desc->gdscs, desc->num_gdscs,
return ret;
}
- devm_add_action(dev, qcom_cc_gdsc_unregister, dev);
-
-
- return 0;
+ return devm_add_action_or_reset(dev, qcom_cc_gdsc_unregister, dev);
}
EXPORT_SYMBOL_GPL(qcom_cc_really_probe);