From patchwork Sat Jun 3 18:36:10 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: 9764477 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 DA2AF602B6 for ; Sat, 3 Jun 2017 18:36:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CCE2E284BF for ; Sat, 3 Jun 2017 18:36:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AFBCF28577; Sat, 3 Jun 2017 18:36:41 +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 30904284BF for ; Sat, 3 Jun 2017 18:36:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751188AbdFCSgj (ORCPT ); Sat, 3 Jun 2017 14:36:39 -0400 Received: from mout.web.de ([212.227.15.14]:64384 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750991AbdFCSgi (ORCPT ); Sat, 3 Jun 2017 14:36:38 -0400 Received: from [192.168.1.2] ([77.182.192.46]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0Mb6EN-1daH9r1Rn9-00Ke2Y; Sat, 03 Jun 2017 20:36:12 +0200 Subject: [PATCH 9/9] ARM: OMAP2+: Delete an error message for a failed memory allocation in omap_timer_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: Date: Sat, 3 Jun 2017 20:36:10 +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:84zWc7Opt0qbFrqdYXLRDEUzrEt8qWgev4r3inwar4G0oK0NjRd Czyr6bDVIIxOR0e4ZXyIdes+rd46KFr1UYwtJahcqQrb3Q67CUwYQTkqqt73QsOQ72/cLef izWpl/jlbnfSQNrer2zZSxM3EJf+cjcx9Qwen9hCOu+SUjCEhUrfWzElmJKRsVZjH9pupHz vcVmMGqnjwpFsXlbT4N+g== X-UI-Out-Filterresults: notjunk:1; V01:K0:7UQnJMeKdKw=:1HkC2EMrGUo2EJ89iUqCQg XHgOf51SV8nlMCv1f//Pl6WJy5trYzpwepIPWHkee1I01q9p1dyzdDzHAyuQHJ820IYjay3NC AbtfQkqqjdwEM+YtbW2gDBI5KN8dpwr7lJRzh8hAfFeCn7HdRj+JouRd0dcpg/Mro2/FJdJmh /8nKkTIkDbddXzLkmLOGxxkktImTKdR+NOsrsZAcYDq6fC1rN9OGbmluNBBXSvoltZHtwgiyK e+MJD1KLxPsqbRYOkkB7Ua7Lh4IRhzq8RzSYJBNl1ZusdcY+WvjS4hjon+2034nLOoixAAKNb IRBrajZvIc9Kpkyb+BH6NgKvgXcDzoPdiz3PEr/JUSuJIGHOpwS/tpmd6aJ4sh+t86/LIQcyc iMbKRuYgooOU1/KMyDud9zLD7QcPwJgqCTKYnBcnEKMJzEzpCMjH262HgbI4F0hFt5f3kXgZq 23Ur2iSc27GZCJoXmLJYxf4Nn21sAkat82vDf3AW0CXsgq+zYS9VhaMd9sV7A4gsQJW+f10xE SpefLML0O4KECRodLQuDKBjEsXgkbAlQaPIF9cucw0cBa81DPoizYMT3epStnlF22+0xg6OaH JrDZNmp1433DQqzOpT4rAUZ3waeSrstoCk8QXTAw/Zc2i1u8fyhPgAt1RtqsfjXAT/PcP4V2i Yjy9ENTApvA7MCS87YkTd76frfClPFkL0Z1sO0ZDsJlYaXkjX77FnnRgw6123qxE6ttBMR1lt xcMdCADyZ9ShBJwAK9aH0XjeO5Yu427/lxqwnYyVYlLePim9AvTxXRnSDMX80ZxdVYHXYnTbW ZzQb5YF 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 19:23:59 +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/timer.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index 07dd692c4737..f6b5ccfe4653 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c @@ -693,7 +693,5 @@ static int __init omap_timer_init(struct omap_hwmod *oh, void *unused) - if (!pdata) { - pr_err("%s: No memory for [%s]\n", __func__, oh->name); + if (!pdata) return -ENOMEM; - } /* * Extract the IDs from name field in hwmod database