usb: xhci-plat: properly handle probe deferral for devm_clk_get()
[firefly-linux-kernel-4.4.55.git] / drivers / usb / host / xhci-plat.c
index 05647e6753cd833f9b9e87924832be5d3e2c2216..4fe7c9b56bc0856faa76a44a50ae5d1192d89b62 100644 (file)
@@ -132,6 +132,9 @@ static int xhci_plat_probe(struct platform_device *pdev)
                ret = clk_prepare_enable(clk);
                if (ret)
                        goto put_hcd;
+       } else if (PTR_ERR(clk) == -EPROBE_DEFER) {
+               ret = -EPROBE_DEFER;
+               goto put_hcd;
        }
 
        if (of_device_is_compatible(pdev->dev.of_node,