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-fixed-rate.c | |
parent | e0cdcda508f110b7ec190dc7c5eb2869ba73a535 (diff) | |
download | linux-stable-d122db7e86669244759226bfdd2b9d623d5c6ae8.tar.gz linux-stable-d122db7e86669244759226bfdd2b9d623d5c6ae8.tar.bz2 linux-stable-d122db7e86669244759226bfdd2b9d623d5c6ae8.zip |
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-fixed-rate.c')
-rw-r--r-- | drivers/clk/clk-fixed-rate.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/clk/clk-fixed-rate.c b/drivers/clk/clk-fixed-rate.c index 0fc56ab6e844..f85ec8d1711f 100644 --- a/drivers/clk/clk-fixed-rate.c +++ b/drivers/clk/clk-fixed-rate.c @@ -65,11 +65,9 @@ struct clk *clk_register_fixed_rate_with_accuracy(struct device *dev, struct clk_init_data init; /* allocate fixed-rate clock */ - fixed = kzalloc(sizeof(struct clk_fixed_rate), GFP_KERNEL); - if (!fixed) { - pr_err("%s: could not allocate fixed clk\n", __func__); + fixed = kzalloc(sizeof(*fixed), GFP_KERNEL); + if (!fixed) return ERR_PTR(-ENOMEM); - } init.name = name; init.ops = &clk_fixed_rate_ops; |