From patchwork Sat Jun 3 18:28:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9764437 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6098660360 for ; Sat, 3 Jun 2017 18:29:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A27227FB6 for ; Sat, 3 Jun 2017 18:29:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4ED0628557; Sat, 3 Jun 2017 18:29:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EEF8C27FB6 for ; Sat, 3 Jun 2017 18:29:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751240AbdFCS27 (ORCPT ); Sat, 3 Jun 2017 14:28:59 -0400 Received: from mout.web.de ([212.227.15.4]:59210 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750991AbdFCS26 (ORCPT ); Sat, 3 Jun 2017 14:28:58 -0400 Received: from [192.168.1.2] ([77.182.192.46]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0Lvw4L-1dy7Zi1tLJ-017jnw; Sat, 03 Jun 2017 20:28:31 +0200 Subject: [PATCH 2/9] ARM: OMAP2+: Delete an error message for a failed memory allocation in two functions From: SF Markus Elfring To: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Russell King , Tony Lindgren Cc: LKML , kernel-janitors@vger.kernel.org References: Message-ID: <9e8c21ba-0c34-7a7b-2583-59d7a8c19af6@users.sourceforge.net> Date: Sat, 3 Jun 2017 20:28:30 +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-Language: en-GB X-Provags-ID: V03:K0:2bHgyBcq0phBPJaNBA0uYUJ4P8F/Ogf73lbsMloSXydOOrDFT/r 6k+wPmqkM2iB5DFVkuTzBkmgENyoOi5Bj6OKixb3xxietOe7R1+23jPS7Sa3tp7sGXwePof oJkY0J3hiA+BK0ph9HHxKUL47fIXxjzjl5gDATUFSctSQIvH3jMYpb6W29l7Zoqey7NJKZo 6lGSxRmx5B804L/vemX+A== X-UI-Out-Filterresults: notjunk:1; V01:K0:q2gvVKuJb/s=:J9OztnIDoq1iKv2K+JwbzR tYxrweLkQaKfXvzSUmIQgwC2wcmW9TT4XYzDI6vngEmlmo6AhDBc6lZWLZyEQLdid6vttpTh7 lw4KO2iBwVF7hfmewE6d/MjQy7RjrFvu6Fgx1/YC/mkG946Zb68v9RxEiwvTZ+wh4LqLsqBua 7GOmOL+pKsoCNbyxGbJPN2M4zLSa1qWJC5Mj+d+Uo+FhQqNyrWLGqC84JBlunURPB8mugpnKl wXE/szKw3BWkGixLHHotk+GM7kTgqaDcU7WcgTc2nYOcoZrMOAk7aV5Ees+821mW4hlmNeGXf X3btQAH1bSw+0YwNYJVx6pko1mo1FS/+yVrzB6qOzhmewkX/g5I1l5JrwACMjCNw9nuOBzNB7 wBeTTc5hXQDC7Hse0sK4XbOa7QlBxiTAFyPqVTvihivlG1cFVSO8PDT0wGpGjRtS4rjyZzbDq nxmfsIFYebmaH5l8dtjm/k32Reb4adWV3IZtJECQVBpXASHHu2lbxzuDSdNka7gNBjzWfBnC7 TRmLAnY4Nw/ir3EvtT094VaFwjSXENFcHHDZQ7Vib7XpGeRo+ZdCr3ZP4gnyq9V0Gefupge+Z NmEqNW7c49yLjTPffOkxsMwRwZp87TN/+5q8NumUn7DfDJJRna4OJ130GRTt4iVaZeLCU94nM jM7/Q5SLFf83Z5qciN45AdQOerXNzIC2TnZjf2tBx8T2ZIe+maWWEl+5NfbJc2WQ7Y6fyeuPV RbxgINmSd2KeFnivFr6+cIzgJwMupBy+6+s7hk7AG4xY8rIrS11H5fA4KetbO09sYo1/rMd5a bVgVeKu Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Sat, 3 Jun 2017 17:24:27 +0200 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 --- arch/arm/mach-omap2/hsmmc.c | 5 +---- 1 file changed, 1 insertion(+), 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 @@ -155,5 +155,4 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, if (!hc_name) { - pr_err("Cannot allocate memory for controller slot name\n"); kfree(hc_name); return -ENOMEM; } @@ -318,7 +317,5 @@ static void __init omap_hsmmc_init_one(struct omap2_hsmmc_info *hsmmcinfo, - if (!mmc_data) { - pr_err("Cannot allocate memory for mmc device!\n"); + if (!mmc_data) return; - } res = omap_hsmmc_pdata_init(hsmmcinfo, mmc_data); if (res < 0)