diff options
author | Stephen Boyd <sboyd@codeaurora.org> | 2015-05-14 16:47:10 -0700 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2015-05-14 16:51:50 -0700 |
commit | d122db7e86669244759226bfdd2b9d623d5c6ae8 (patch) | |
tree | 00ef798ecddddb591b20ef03214ace1b0a6bb3ef /drivers/clk/clk-gate.c | |
parent | e0cdcda508f110b7ec190dc7c5eb2869ba73a535 (diff) |
clk: basic-types: Remove useless allocation failure printks
Printing an error on kmalloc() failures is unnecessary. Remove
the print and use *ptr in sizeof() for future-proof code.
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/clk-gate.c')
-rw-r--r-- | drivers/clk/clk-gate.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/clk/clk-gate.c b/drivers/clk/clk-gate.c index 3f0e4200cb5d..551dd0672794 100644 --- a/drivers/clk/clk-gate.c +++ b/drivers/clk/clk-gate.c @@ -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; |