clk: SPEAr: Vco-pll: Fix compilation warning
authorViresh Kumar <viresh.kumar@linaro.org>
Thu, 4 Oct 2012 09:49:08 +0000 (15:19 +0530)
committerMike Turquette <mturquette@linaro.org>
Mon, 29 Oct 2012 18:04:34 +0000 (11:04 -0700)
Currently we are getting following warning for SPEAr clk-vco-pll.

"warning: i is used uninitialized in this function."

This is because we are getting value of i by passing its pointer to another
routine.

The variables here are really not used uninitialized.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
drivers/clk/spear/clk-vco-pll.c

index 5f1b6badeb15be0a8fa8a9285f90c0bfe9c9b55f..1b9b65bca51edbf65ba6ba62d39d7520a19f7453 100644 (file)
@@ -147,7 +147,7 @@ static int clk_pll_set_rate(struct clk_hw *hw, unsigned long drate,
        struct clk_pll *pll = to_clk_pll(hw);
        struct pll_rate_tbl *rtbl = pll->vco->rtbl;
        unsigned long flags = 0, val;
-       int i;
+       int uninitialized_var(i);
 
        clk_pll_round_rate_index(hw, drate, NULL, &i);