diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2017-09-27 12:00:21 -0400 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2017-11-13 20:41:53 -0500 |
commit | 63b1a5d75090ac41369d06d609d3268dbf16d41f (patch) | |
tree | 4151559357c221d042fe3a3d74f84344b2b73313 | |
parent | f80c8a29f94faf6d4a2a3b25d4473d62edbd7aab (diff) |
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>
-rw-r--r-- | drivers/clk/spear/clk-aux-synth.c | 4 | ||||
-rw-r--r-- | drivers/clk/spear/clk-frac-synth.c | 4 | ||||
-rw-r--r-- | drivers/clk/spear/clk-gpt-synth.c | 4 | ||||
-rw-r--r-- | drivers/clk/spear/clk-vco-pll.c | 8 |
4 files changed, 5 insertions, 15 deletions
diff --git a/drivers/clk/spear/clk-aux-synth.c b/drivers/clk/spear/clk-aux-synth.c index f271c350ef94..ee7a7c043e3b 100644 --- a/drivers/clk/spear/clk-aux-synth.c +++ b/drivers/clk/spear/clk-aux-synth.c | |||
@@ -149,10 +149,8 @@ struct clk *clk_register_aux(const char *aux_name, const char *gate_name, | |||
149 | } | 149 | } |
150 | 150 | ||
151 | aux = kzalloc(sizeof(*aux), GFP_KERNEL); | 151 | aux = kzalloc(sizeof(*aux), GFP_KERNEL); |
152 | if (!aux) { | 152 | if (!aux) |
153 | pr_err("could not allocate aux clk\n"); | ||
154 | return ERR_PTR(-ENOMEM); | 153 | return ERR_PTR(-ENOMEM); |
155 | } | ||
156 | 154 | ||
157 | /* struct clk_aux assignments */ | 155 | /* struct clk_aux assignments */ |
158 | if (!masks) | 156 | if (!masks) |
diff --git a/drivers/clk/spear/clk-frac-synth.c b/drivers/clk/spear/clk-frac-synth.c index 58d678b5b40a..c48f3ed2d570 100644 --- a/drivers/clk/spear/clk-frac-synth.c +++ b/drivers/clk/spear/clk-frac-synth.c | |||
@@ -136,10 +136,8 @@ struct clk *clk_register_frac(const char *name, const char *parent_name, | |||
136 | } | 136 | } |
137 | 137 | ||
138 | frac = kzalloc(sizeof(*frac), GFP_KERNEL); | 138 | frac = kzalloc(sizeof(*frac), GFP_KERNEL); |
139 | if (!frac) { | 139 | if (!frac) |
140 | pr_err("could not allocate frac clk\n"); | ||
141 | return ERR_PTR(-ENOMEM); | 140 | return ERR_PTR(-ENOMEM); |
142 | } | ||
143 | 141 | ||
144 | /* struct clk_frac assignments */ | 142 | /* struct clk_frac assignments */ |
145 | frac->reg = reg; | 143 | frac->reg = reg; |
diff --git a/drivers/clk/spear/clk-gpt-synth.c b/drivers/clk/spear/clk-gpt-synth.c index 1a722e99e76e..6e95d7f3ade9 100644 --- a/drivers/clk/spear/clk-gpt-synth.c +++ b/drivers/clk/spear/clk-gpt-synth.c | |||
@@ -125,10 +125,8 @@ struct clk *clk_register_gpt(const char *name, const char *parent_name, unsigned | |||
125 | } | 125 | } |
126 | 126 | ||
127 | gpt = kzalloc(sizeof(*gpt), GFP_KERNEL); | 127 | gpt = kzalloc(sizeof(*gpt), GFP_KERNEL); |
128 | if (!gpt) { | 128 | if (!gpt) |
129 | pr_err("could not allocate gpt clk\n"); | ||
130 | return ERR_PTR(-ENOMEM); | 129 | return ERR_PTR(-ENOMEM); |
131 | } | ||
132 | 130 | ||
133 | /* struct clk_gpt assignments */ | 131 | /* struct clk_gpt assignments */ |
134 | gpt->reg = reg; | 132 | gpt->reg = reg; |
diff --git a/drivers/clk/spear/clk-vco-pll.c b/drivers/clk/spear/clk-vco-pll.c index dc21ca4601aa..e06b821fa60e 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, | |||
292 | } | 292 | } |
293 | 293 | ||
294 | vco = kzalloc(sizeof(*vco), GFP_KERNEL); | 294 | vco = kzalloc(sizeof(*vco), GFP_KERNEL); |
295 | if (!vco) { | 295 | if (!vco) |
296 | pr_err("could not allocate vco clk\n"); | ||
297 | return ERR_PTR(-ENOMEM); | 296 | return ERR_PTR(-ENOMEM); |
298 | } | ||
299 | 297 | ||
300 | pll = kzalloc(sizeof(*pll), GFP_KERNEL); | 298 | pll = kzalloc(sizeof(*pll), GFP_KERNEL); |
301 | if (!pll) { | 299 | if (!pll) |
302 | pr_err("could not allocate pll clk\n"); | ||
303 | goto free_vco; | 300 | goto free_vco; |
304 | } | ||
305 | 301 | ||
306 | /* struct clk_vco assignments */ | 302 | /* struct clk_vco assignments */ |
307 | vco->mode_reg = mode_reg; | 303 | vco->mode_reg = mode_reg; |