MLK-22346 clk: imx: Fix the initialization of flag variable
authorJacky Bai <ping.bai@nxp.com>
Tue, 30 Jul 2019 09:13:12 +0000 (17:13 +0800)
committerJacky Bai <ping.bai@nxp.com>
Wed, 31 Jul 2019 08:30:21 +0000 (16:30 +0800)
The flag variable must be initialized before used.
the 'OR' operation will cause unpredictable behavior.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>
drivers/clk/imx/clk-mux-scu.c

index ac1c8bc..31b63c8 100644 (file)
@@ -354,7 +354,7 @@ struct clk *clk_register_mux_gpr_scu(struct device *dev, const char *name,
        init.ops = &clk_mux_gpr_scu_ops;
        init.parent_names = parents;
        init.num_parents = num_parents;
-       init.flags |= CLK_SET_PARENT_NOCACHE;
+       init.flags = CLK_SET_PARENT_NOCACHE;
 
        gpr_scu_mux->hw.init = &init;
        gpr_scu_mux->rsrc_id = rsrc_id;