Merge tag 'trace-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux...
[cascardo/linux.git] / drivers / clk / clk.c
index 71cc567..0fb39fe 100644 (file)
@@ -1908,10 +1908,6 @@ int clk_set_phase(struct clk *clk, int degrees)
 
        clk_prepare_lock();
 
-       /* bail early if nothing to do */
-       if (degrees == clk->core->phase)
-               goto out;
-
        trace_clk_set_phase(clk->core, degrees);
 
        if (clk->core->ops->set_phase)
@@ -1922,7 +1918,6 @@ int clk_set_phase(struct clk *clk, int degrees)
        if (!ret)
                clk->core->phase = degrees;
 
-out:
        clk_prepare_unlock();
 
        return ret;
@@ -3174,19 +3169,14 @@ __of_clk_get_hw_from_provider(struct of_clk_provider *provider,
                              struct of_phandle_args *clkspec)
 {
        struct clk *clk;
-       struct clk_hw *hw = ERR_PTR(-EPROBE_DEFER);
 
-       if (provider->get_hw) {
-               hw = provider->get_hw(clkspec, provider->data);
-       } else if (provider->get) {
-               clk = provider->get(clkspec, provider->data);
-               if (!IS_ERR(clk))
-                       hw = __clk_get_hw(clk);
-               else
-                       hw = ERR_CAST(clk);
-       }
+       if (provider->get_hw)
+               return provider->get_hw(clkspec, provider->data);
 
-       return hw;
+       clk = provider->get(clkspec, provider->data);
+       if (IS_ERR(clk))
+               return ERR_CAST(clk);
+       return __clk_get_hw(clk);
 }
 
 struct clk *__of_clk_get_from_provider(struct of_phandle_args *clkspec,