From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx> Date: Tue, 23 May 2017 21:41:32 +0200 Omit two extra messages for memory allocation failures in this function. 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@xxxxxxxxxxxxxxxxxxxxx> --- arch/mips/kernel/smp-cps.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/arch/mips/kernel/smp-cps.c b/arch/mips/kernel/smp-cps.c index 36954ddd0b9f..bc8d7f6a62c2 100644 --- a/arch/mips/kernel/smp-cps.c +++ b/arch/mips/kernel/smp-cps.c @@ -171,7 +171,5 @@ static void __init cps_prepare_cpus(unsigned int max_cpus) - if (!mips_cps_core_bootcfg) { - pr_err("Failed to allocate boot config for %u cores\n", ncores); + if (!mips_cps_core_bootcfg) goto err_out; - } /* Allocate VPE boot configuration structs */ for (c = 0; c < ncores; c++) { @@ -182,8 +180,5 @@ static void __init cps_prepare_cpus(unsigned int max_cpus) - if (!mips_cps_core_bootcfg[c].vpe_config) { - pr_err("Failed to allocate %u VPE boot configs\n", - core_vpes); + if (!mips_cps_core_bootcfg[c].vpe_config) goto err_out; - } } /* Mark this CPU as booted */ -- 2.13.0