From patchwork Sat Jun 3 18:27:17 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: 9764431 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 3AF8060360 for ; Sat, 3 Jun 2017 18:27:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 35AC727FB6 for ; Sat, 3 Jun 2017 18:27:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 29FC028557; Sat, 3 Jun 2017 18:27:50 +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 BF42E27FB6 for ; Sat, 3 Jun 2017 18:27:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751164AbdFCS1s (ORCPT ); Sat, 3 Jun 2017 14:27:48 -0400 Received: from mout.web.de ([212.227.15.3]:51315 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750991AbdFCS1r (ORCPT ); Sat, 3 Jun 2017 14:27:47 -0400 Received: from [192.168.1.2] ([77.182.192.46]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MCIoz-1d8f3u0Giv-009AFd; Sat, 03 Jun 2017 20:27:19 +0200 Subject: [PATCH 1/9] ARM: OMAP2+: Delete an error message for a failed memory allocation in omap_mcspi_init() 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: <2e685abe-2544-f996-4756-9836b8ecd450@users.sourceforge.net> Date: Sat, 3 Jun 2017 20:27:17 +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:cMD3LLD1bshZpLUPs6/ZPmgHAJIqWexxEZ+lCrF4iC4Wr+VlO/J /m4DBfwbHQ4f/JBFm/C8l1Je12Qgfq3v3azduO+FgeqjM3m6I0aB2DiHkK6zhiehgzqNiiY Odmc7F9CurnM+Oa3p98yFK2tYJvgCHFyzgQvx+P3yPPwNw3sa7a9RndRqT0OKc0kw2FShxc vvRdUW+PjwHFnt9AbgOGQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:qPoyycqJydI=:oZiE3pZH53Yhbp0UszLGid duISsSlfiJVxw6Zp1Pj2Gtz2BqoyUqxx4pwL+3ln/JdLZRyxfeBm3o8G0STab3y0PbcgHOb1R PeUPw807Cju+H0yfGdTeb/22X9/VEkjpJ9vARAX3Aqe5pqxRm67mN4B35X004LCVtzb/W5SGC rGYaN4DrBiC+tfNW3I/q1TdMzjkLy1NadX4UO2PlOJig78iK5ez9HhQ1KHTnYlbb7AG6XUCat n7m6wTdIqdjdazLc/G7B3SbKCckVR3F2GZQgdU6FHSKlflc70UwrpmaD4v+FYH/NVvqbnzoN8 ekHBOHg5qF66xnXiA1U9rwM6gzt7rLFqyt7IzgpNvHQVovcquCyaP+MDhy3WBl6u0wf+LstzC be+AKzHWE+7QZ8tsdxtAdTySuMIjPqpXfbJDA2LYRpxMAFOZK5J11zSl5DOWkprDEd6m53wKv hm4sWOXdgIO9ket+ZtEwOf0A3VCH4bKMEGU/ucsXzR5rdSPmSoRmuIDLji5BzYt1ZhVcFANkv tXyow51TprIDKxsZu3etpXWek1IanYHxOfgMKI4515mDD9Q4XZuQ+9wL6auUI0JtZ2R+b1uU2 4A6iQYOkKNHLXl1OZuz9EfBYi87nEA7Fqrc12yTgsjooFqAza1ehpWeOmiOkw/rjzu+H2U+Ms eLxxq1ig3QjA9hyhycG2TWW7dMhb4GmMCcszhiuTAF8+9CjjmIh6KjggLbOLuWkSdi7Y0iT2R I+N7bu6A20OIHDXxUeXl4z7He2vPSIlM/KxI2dMNOEheGp2AZjwpp3teZlv3AhHfN22UY1Iea oQyMp5l 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 16:45:12 +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-omap2/devices.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 473951203104..cf1fc0d162c4 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c @@ -82,7 +82,5 @@ static int __init omap_mcspi_init(struct omap_hwmod *oh, void *unused) - if (!pdata) { - pr_err("Memory allocation for McSPI device failed\n"); + if (!pdata) return -ENOMEM; - } pdata->num_cs = mcspi_attrib->num_chipselect; switch (oh->class->rev) {