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-fractional-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-fractional-divider.c')
-rw-r--r-- | drivers/clk/clk-fractional-divider.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/clk/clk-fractional-divider.c b/drivers/clk/clk-fractional-divider.c index 6aa72d9d79ba..140eb5844dc4 100644 --- a/drivers/clk/clk-fractional-divider.c +++ b/drivers/clk/clk-fractional-divider.c @@ -109,10 +109,8 @@ struct clk *clk_register_fractional_divider(struct device *dev, struct clk *clk; fd = kzalloc(sizeof(*fd), GFP_KERNEL); - if (!fd) { - dev_err(dev, "could not allocate fractional divider clk\n"); + if (!fd) return ERR_PTR(-ENOMEM); - } init.name = name; init.ops = &clk_fractional_divider_ops; |