phy: stm32: don't print an error on probe deferral
authorAmelie Delaunay <amelie.delaunay@st.com>
Tue, 10 Nov 2020 13:05:31 +0000 (14:05 +0100)
committerVinod Koul <vkoul@kernel.org>
Mon, 16 Nov 2020 09:49:03 +0000 (15:19 +0530)
Change stm32-usbphyc driver to not print an error message when the device
probe operation is deferred.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com>
Link: https://lore.kernel.org/r/20201110130531.7610-1-amelie.delaunay@st.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/st/phy-stm32-usbphyc.c

index 0ab18f2078db03f3f234ebcc4ef6431d785fa009..8ebfd567d407d81511917d44feab99c2081a6324 100644 (file)
@@ -326,11 +326,8 @@ static int stm32_usbphyc_probe(struct platform_device *pdev)
                return PTR_ERR(usbphyc->base);
 
        usbphyc->clk = devm_clk_get(dev, NULL);
-       if (IS_ERR(usbphyc->clk)) {
-               ret = PTR_ERR(usbphyc->clk);
-               dev_err(dev, "clk get failed: %d\n", ret);
-               return ret;
-       }
+       if (IS_ERR(usbphyc->clk))
+               return dev_err_probe(dev, PTR_ERR(usbphyc->clk), "clk get_failed\n");
 
        ret = clk_prepare_enable(usbphyc->clk);
        if (ret) {