Merge branch 'for-4.2/ti-clk-move' of https://github.com/t-kristo/linux-pm into clk...
[firefly-linux-kernel-4.4.55.git] / drivers / clk / clk-gate.c
index 3f0e4200cb5d4ca4a680c78479ac86ed116766a5..551dd067279402abbd45685315ee9df1c5f7c5d5 100644 (file)
@@ -135,11 +135,9 @@ struct clk *clk_register_gate(struct device *dev, const char *name,
        }
 
        /* allocate the gate */
-       gate = kzalloc(sizeof(struct clk_gate), GFP_KERNEL);
-       if (!gate) {
-               pr_err("%s: could not allocate gated clk\n", __func__);
+       gate = kzalloc(sizeof(*gate), GFP_KERNEL);
+       if (!gate)
                return ERR_PTR(-ENOMEM);
-       }
 
        init.name = name;
        init.ops = &clk_gate_ops;