Skip to content

Commit

Permalink
clk: use uninitialized_var instead setting 'flags' to 0 directly.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Xiubo Li authored and Mike Turquette committed Sep 27, 2014
1 parent 4dc7ed3 commit 7af4724
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/clk/clk-gate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7af4724

Please sign in to comment.