diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2017-06-03 11:24:27 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2017-06-08 06:02:31 -0400 |
commit | 1a61a2a5a6476c9053a6c50265ded7f1387960fb (patch) | |
tree | 4cf0efedf6737064a29a203ed62c3056085c0d7e | |
parent | 33d3842d640e981e2c5ee772befff756b7f2d6f3 (diff) |
ARM: OMAP2+: Delete an error message for a failed memory allocation in two functions
Omit an extra message for a memory allocation failure in these functions.
This issue was detected by using the Coccinelle software.
Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r-- | arch/arm/mach-omap2/hsmmc.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index cb754c46747e..be517b048762 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c | |||
@@ -153,7 +153,6 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, | |||
153 | 153 | ||
154 | hc_name = kzalloc(sizeof(char) * (HSMMC_NAME_LEN + 1), GFP_KERNEL); | 154 | hc_name = kzalloc(sizeof(char) * (HSMMC_NAME_LEN + 1), GFP_KERNEL); |
155 | if (!hc_name) { | 155 | if (!hc_name) { |
156 | pr_err("Cannot allocate memory for controller slot name\n"); | ||
157 | kfree(hc_name); | 156 | kfree(hc_name); |
158 | return -ENOMEM; | 157 | return -ENOMEM; |
159 | } | 158 | } |
@@ -315,10 +314,8 @@ static void __init omap_hsmmc_init_one(struct omap2_hsmmc_info *hsmmcinfo, | |||
315 | int res; | 314 | int res; |
316 | 315 | ||
317 | mmc_data = kzalloc(sizeof(*mmc_data), GFP_KERNEL); | 316 | mmc_data = kzalloc(sizeof(*mmc_data), GFP_KERNEL); |
318 | if (!mmc_data) { | 317 | if (!mmc_data) |
319 | pr_err("Cannot allocate memory for mmc device!\n"); | ||
320 | return; | 318 | return; |
321 | } | ||
322 | 319 | ||
323 | res = omap_hsmmc_pdata_init(hsmmcinfo, mmc_data); | 320 | res = omap_hsmmc_pdata_init(hsmmcinfo, mmc_data); |
324 | if (res < 0) | 321 | if (res < 0) |