diff options
author | Stephen Boyd <sboyd@codeaurora.org> | 2015-05-15 02:47:10 +0300 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2015-05-15 02:51:50 +0300 |
commit | d122db7e86669244759226bfdd2b9d623d5c6ae8 (patch) | |
tree | 00ef798ecddddb591b20ef03214ace1b0a6bb3ef /drivers/clk/clk-divider.c | |
parent | e0cdcda508f110b7ec190dc7c5eb2869ba73a535 (diff) | |
download | linux-d122db7e86669244759226bfdd2b9d623d5c6ae8.tar.xz |
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-divider.c')
-rw-r--r-- | drivers/clk/clk-divider.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/clk/clk-divider.c b/drivers/clk/clk-divider.c index 25006a8bb8e6..706b5783c360 100644 --- a/drivers/clk/clk-divider.c +++ b/drivers/clk/clk-divider.c @@ -430,11 +430,9 @@ static struct clk *_register_divider(struct device *dev, const char *name, } /* allocate the divider */ - div = kzalloc(sizeof(struct clk_divider), GFP_KERNEL); - if (!div) { - pr_err("%s: could not allocate divider clk\n", __func__); + div = kzalloc(sizeof(*div), GFP_KERNEL); + if (!div) return ERR_PTR(-ENOMEM); - } init.name = name; init.ops = &clk_divider_ops; |