]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
clk: qcom: fix simple_return.cocci warnings
authorFengguang Wu <fengguang.wu@intel.com>
Fri, 28 Nov 2014 18:01:38 +0000 (02:01 +0800)
committerStephen Boyd <sboyd@codeaurora.org>
Fri, 27 Mar 2015 05:43:47 +0000 (22:43 -0700)
drivers/clk/qcom/clk-pll.c:74:1-4: WARNING: end returns can be simpified

 Simplify a trivial if-return sequence.  Possibly combine with a
 preceding function call.
Generated by: scripts/coccinelle/misc/simple_return.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/qcom/clk-pll.c

index b4325f65a1bf6f225811936c9a00927391c62787..245d5063a385968a5081050b7ef679f86a71b124 100644 (file)
@@ -71,12 +71,8 @@ static int clk_pll_enable(struct clk_hw *hw)
        udelay(50);
 
        /* Enable PLL output. */
-       ret = regmap_update_bits(pll->clkr.regmap, pll->mode_reg, PLL_OUTCTRL,
+       return regmap_update_bits(pll->clkr.regmap, pll->mode_reg, PLL_OUTCTRL,
                                 PLL_OUTCTRL);
-       if (ret)
-               return ret;
-
-       return 0;
 }
 
 static void clk_pll_disable(struct clk_hw *hw)