]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
clk: use uninitialized_var instead setting 'flags' to 0 directly.
authorXiubo Li <Li.Xiubo@freescale.com>
Mon, 22 Sep 2014 05:52:11 +0000 (13:52 +0800)
committerMike Turquette <mturquette@linaro.org>
Sat, 27 Sep 2014 23:03:06 +0000 (16:03 -0700)
Setting 'flags' to zero will be certainly a misleading way to avoid
warning of 'flags' may be used uninitialized. uninitialized_var is
a correct way because the warning is a false possitive.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
drivers/clk/clk-gate.c

index 4a58c55255bd884f3f1e7deea52048712b297729..51fd87fb7ba691e8a52e40ddc1ee4524ecd3e781 100644 (file)
@@ -45,7 +45,7 @@ static void clk_gate_endisable(struct clk_hw *hw, int enable)
 {
        struct clk_gate *gate = to_clk_gate(hw);
        int set = gate->flags & CLK_GATE_SET_TO_DISABLE ? 1 : 0;
-       unsigned long flags = 0;
+       unsigned long uninitialized_var(flags);
        u32 reg;
 
        set ^= enable;