diff options
| author | Markus Elfring <elfring@users.sourceforge.net> | 2017-09-27 13:14:01 -0400 |
|---|---|---|
| committer | Stephen Boyd <sboyd@codeaurora.org> | 2017-11-13 20:41:38 -0500 |
| commit | f80c8a29f94faf6d4a2a3b25d4473d62edbd7aab (patch) | |
| tree | 21073ee05a2416d7e6f0860066412dac4f5d91f8 | |
| parent | 7a3aad90d331de9b78ea8d292bb4fd4f9ecdfd75 (diff) | |
clk: ti: 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>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
| -rw-r--r-- | drivers/clk/ti/divider.c | 4 | ||||
| -rw-r--r-- | drivers/clk/ti/mux.c | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/drivers/clk/ti/divider.c b/drivers/clk/ti/divider.c index 88f04a4cb890..77f93f6d2806 100644 --- a/drivers/clk/ti/divider.c +++ b/drivers/clk/ti/divider.c | |||
| @@ -292,10 +292,8 @@ static struct clk *_register_divider(struct device *dev, const char *name, | |||
| 292 | 292 | ||
| 293 | /* allocate the divider */ | 293 | /* allocate the divider */ |
| 294 | div = kzalloc(sizeof(*div), GFP_KERNEL); | 294 | div = kzalloc(sizeof(*div), GFP_KERNEL); |
| 295 | if (!div) { | 295 | if (!div) |
| 296 | pr_err("%s: could not allocate divider clk\n", __func__); | ||
| 297 | return ERR_PTR(-ENOMEM); | 296 | return ERR_PTR(-ENOMEM); |
| 298 | } | ||
| 299 | 297 | ||
| 300 | init.name = name; | 298 | init.name = name; |
| 301 | init.ops = &ti_clk_divider_ops; | 299 | init.ops = &ti_clk_divider_ops; |
diff --git a/drivers/clk/ti/mux.c b/drivers/clk/ti/mux.c index 18c267b38461..d4705803f3d3 100644 --- a/drivers/clk/ti/mux.c +++ b/drivers/clk/ti/mux.c | |||
| @@ -108,10 +108,8 @@ static struct clk *_register_mux(struct device *dev, const char *name, | |||
| 108 | 108 | ||
| 109 | /* allocate the mux */ | 109 | /* allocate the mux */ |
| 110 | mux = kzalloc(sizeof(*mux), GFP_KERNEL); | 110 | mux = kzalloc(sizeof(*mux), GFP_KERNEL); |
| 111 | if (!mux) { | 111 | if (!mux) |
| 112 | pr_err("%s: could not allocate mux clk\n", __func__); | ||
| 113 | return ERR_PTR(-ENOMEM); | 112 | return ERR_PTR(-ENOMEM); |
| 114 | } | ||
| 115 | 113 | ||
| 116 | init.name = name; | 114 | init.name = name; |
| 117 | init.ops = &ti_clk_mux_ops; | 115 | init.ops = &ti_clk_mux_ops; |
