Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751249AbdFCUJ1 (ORCPT ); Sat, 3 Jun 2017 16:09:27 -0400 Received: from mout.web.de ([212.227.15.4]:52633 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750991AbdFCUJZ (ORCPT ); Sat, 3 Jun 2017 16:09:25 -0400 Subject: [PATCH 1/3] ARM: pxa: Delete an error message for a failed memory allocation in pxa_pm_init() From: SF Markus Elfring To: linux-arm-kernel@lists.infradead.org, Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King Cc: LKML , kernel-janitors@vger.kernel.org References: Message-ID: <9fb09355-13c4-cad3-a539-55ae7979aa11@users.sourceforge.net> Date: Sat, 3 Jun 2017 22:08:55 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:zL0/sjxlEXYv+FhW9/voV8OFPEBEewKv6h/n2b3kkrxYJkm9tIe Xr86LhAj90u6BKOvbZn2Wpgmhd1fcBV4tE/orMiu+5zB6+VSoc/+5TUerHwdEuxBKg6E39V MqxkWk8FpulnZ+yhXRkjlDjoyHgkCk+zWLg+7vVh194TkngJT70+yYHPr2cAOtPN7iJjVpd Vz5xV4HGS6nkxe8vosWEg== X-UI-Out-Filterresults: notjunk:1;V01:K0:kQlxn4xMM0g=:hYORWJs4siH1cXp2OISRNB y5qVmvd9A+nZcOsuoU1SNX6Ye8CSATuXmHlJfYkz1mR9ExfphB8j3qht2TQ2UvdBaIZCO+VOL 71gSYb5CZwfOKb9FkoqmJ09bb6E3uG6bfVUqCSs6MksJl1eyYAOdygRflIL7OaXt34RDt9q0G aG7pPkO2Xi5moIqLHhrIS1UvPXzLKyV8iXaVXDIIEkuT7WX0d+kq3kC9FnXpK7TE2qC9T1yeb 4JYN1Is0Phso6t9t6q0F9z4nEYcS8J1biMZEm2etxX9Ln20pgbfkgQ3pBaU2zO1w6kH+GvIY+ yXg5qpshoA/+kCH0lxb4eYeMA9a6lKEuSm9WDvPyfwbGhN9tYPWRed+z2UmSzNKr5fD18w0Zf 1MIUL3yXhRxsU0NLdS76koBq1vYgS3qM6LJOxUAUaJuhxO5klBUv7+AHa47EfZpcZveX91nre gBKelCbrwp/HuhwpFFnsr/DNt/BZmKWXl5yQjfPJ/jAvUvCn2P9QCmvj0wM/ax8u8m6Kfbo6A X8ReH+1phpKaPE6Tta8R5G22LSgzvpw+7dLaaDQuUcEXgUY0lrxmgCa4Ymhfl4sU2cSep4waP d2w3CJXrVvTO+Ipy93ldFLFYcmBFvOOC+BDkhL08r5VJtW/pthcwqbmOWoBf72TUcoEJrmbdY EDD0NI6TgBCrA8iVXJ34F9qIO9NDoUZR6Ut53toA9KYqfPffirBxEYHvGkJnmj1AMVSpKtbJs Q1OfRz5y9J4CVQcxfV3LjDNPVD65vzJdNeuD0LSmAkRbiT/910grEH1Md2Y/g63fl2EnSuK8b 9v4gt7/ Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 867 Lines: 28 From: Markus Elfring Date: Sat, 3 Jun 2017 21:34:48 +0200 Omit an extra message for a memory allocation failure 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 --- arch/arm/mach-pxa/pm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/arm/mach-pxa/pm.c b/arch/arm/mach-pxa/pm.c index e7450fb49d24..f2237f471750 100644 --- a/arch/arm/mach-pxa/pm.c +++ b/arch/arm/mach-pxa/pm.c @@ -110,7 +110,5 @@ static int __init pxa_pm_init(void) - if (!sleep_save) { - printk(KERN_ERR "failed to alloc memory for pm save\n"); + if (!sleep_save) return -ENOMEM; - } suspend_set_ops(&pxa_pm_ops); return 0; -- 2.13.0