return devm_add_action_or_reset(qmp->dev, phy_clk_release_provider, np);
}
+static int qmp_combo_register_clocks(struct qmp_combo *qmp, struct device_node *usb_np,
+ struct device_node *dp_np)
+{
+ int ret;
+
+ ret = phy_pipe_clk_register(qmp, usb_np);
+ if (ret)
+ return ret;
+
+ ret = phy_dp_clks_register(qmp, dp_np);
+ if (ret)
+ return ret;
+
+ return 0;
+}
+
static int qmp_combo_parse_dt_lecacy_dp(struct qmp_combo *qmp, struct device_node *np)
{
struct device *dev = qmp->dev;
*/
pm_runtime_forbid(dev);
- ret = phy_pipe_clk_register(qmp, usb_np);
- if (ret)
- goto err_node_put;
-
- ret = phy_dp_clks_register(qmp, dp_np);
+ ret = qmp_combo_register_clocks(qmp, usb_np, dp_np);
if (ret)
goto err_node_put;