phy: qcom-qmp-combo: fix type-c switch registration
[linux-2.6-block.git] / drivers / phy / qualcomm / phy-qcom-qmp-combo.c
index e19d6a084f10f8726f86e5e18ef739a298754f91..17c4ad7553a5edd0960e8ff7e64e97dd7f22b5f5 100644 (file)
@@ -3562,10 +3562,6 @@ static int qmp_combo_probe(struct platform_device *pdev)
        if (ret)
                return ret;
 
-       ret = qmp_combo_typec_switch_register(qmp);
-       if (ret)
-               return ret;
-
        /* Check for legacy binding with child nodes. */
        usb_np = of_get_child_by_name(dev->of_node, "usb3-phy");
        if (usb_np) {
@@ -3585,6 +3581,10 @@ static int qmp_combo_probe(struct platform_device *pdev)
        if (ret)
                goto err_node_put;
 
+       ret = qmp_combo_typec_switch_register(qmp);
+       if (ret)
+               goto err_node_put;
+
        ret = drm_aux_bridge_register(dev);
        if (ret)
                goto err_node_put;