diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2017-09-27 18:00:21 +0200 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2017-11-13 17:41:53 -0800 |
commit | 63b1a5d75090ac41369d06d609d3268dbf16d41f (patch) | |
tree | 4151559357c221d042fe3a3d74f84344b2b73313 /drivers/clk/spear/clk-vco-pll.c | |
parent | f80c8a29f94faf6d4a2a3b25d4473d62edbd7aab (diff) | |
download | op-kernel-dev-63b1a5d75090ac41369d06d609d3268dbf16d41f.zip op-kernel-dev-63b1a5d75090ac41369d06d609d3268dbf16d41f.tar.gz |
clk: spear: Delete error messages for failed memory allocations
Omit extra messages for a memory allocation failure in these
functions.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/spear/clk-vco-pll.c')
-rw-r--r-- | drivers/clk/spear/clk-vco-pll.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/clk/spear/clk-vco-pll.c b/drivers/clk/spear/clk-vco-pll.c index dc21ca4..e06b821 100644 --- a/drivers/clk/spear/clk-vco-pll.c +++ b/drivers/clk/spear/clk-vco-pll.c @@ -292,16 +292,12 @@ struct clk *clk_register_vco_pll(const char *vco_name, const char *pll_name, } vco = kzalloc(sizeof(*vco), GFP_KERNEL); - if (!vco) { - pr_err("could not allocate vco clk\n"); + if (!vco) return ERR_PTR(-ENOMEM); - } pll = kzalloc(sizeof(*pll), GFP_KERNEL); - if (!pll) { - pr_err("could not allocate pll clk\n"); + if (!pll) goto free_vco; - } /* struct clk_vco assignments */ vco->mode_reg = mode_reg; |