summaryrefslogtreecommitdiffstats
path: root/drivers/clk/clk-fixed-factor.c
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@codeaurora.org>2015-05-14 16:47:10 -0700
committerStephen Boyd <sboyd@codeaurora.org>2015-05-14 16:51:50 -0700
commitd122db7e86669244759226bfdd2b9d623d5c6ae8 (patch)
tree00ef798ecddddb591b20ef03214ace1b0a6bb3ef /drivers/clk/clk-fixed-factor.c
parente0cdcda508f110b7ec190dc7c5eb2869ba73a535 (diff)
downloadlinux-d122db7e86669244759226bfdd2b9d623d5c6ae8.tar.bz2
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-factor.c')
-rw-r--r--drivers/clk/clk-fixed-factor.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/clk/clk-fixed-factor.c b/drivers/clk/clk-fixed-factor.c
index d9e3f671c2ea..e186db263d5e 100644
--- a/drivers/clk/clk-fixed-factor.c
+++ b/drivers/clk/clk-fixed-factor.c
@@ -74,10 +74,8 @@ struct clk *clk_register_fixed_factor(struct device *dev, const char *name,
struct clk *clk;
fix = kmalloc(sizeof(*fix), GFP_KERNEL);
- if (!fix) {
- pr_err("%s: could not allocate fixed factor clk\n", __func__);
+ if (!fix)
return ERR_PTR(-ENOMEM);
- }
/* struct clk_fixed_factor assignments */
fix->mult = mult;