Use devm_clk_get_optional() to get optional clock
Cc: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Reviewed-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
        if (IS_ERR(priv->clk_parent))
                return PTR_ERR(priv->clk_parent);
 
-       priv->clk_ext = devm_clk_get(dev, "phy-ext");
-       if (IS_ERR(priv->clk_ext)) {
-               if (PTR_ERR(priv->clk_ext) == -ENOENT)
-                       priv->clk_ext = NULL;
-               else
-                       return PTR_ERR(priv->clk_ext);
-       }
+       priv->clk_ext = devm_clk_get_optional(dev, "phy-ext");
+       if (IS_ERR(priv->clk_ext))
+               return PTR_ERR(priv->clk_ext);
 
        priv->rst = devm_reset_control_get_shared(dev, "phy");
        if (IS_ERR(priv->rst))
 
                if (IS_ERR(priv->clk))
                        return PTR_ERR(priv->clk);
 
-               priv->clk_ext = devm_clk_get(dev, "phy-ext");
-               if (IS_ERR(priv->clk_ext)) {
-                       if (PTR_ERR(priv->clk_ext) == -ENOENT)
-                               priv->clk_ext = NULL;
-                       else
-                               return PTR_ERR(priv->clk_ext);
-               }
+               priv->clk_ext = devm_clk_get_optional(dev, "phy-ext");
+               if (IS_ERR(priv->clk_ext))
+                       return PTR_ERR(priv->clk_ext);
 
                priv->rst = devm_reset_control_get_shared(dev, "phy");
                if (IS_ERR(priv->rst))