From patchwork Sat Jun 3 18:31: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: 9764455 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 B463A60360 for ; Sat, 3 Jun 2017 18:31:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AF06F284EE for ; Sat, 3 Jun 2017 18:31:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A3B2F28557; Sat, 3 Jun 2017 18:31: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 5A4D8284EE for ; Sat, 3 Jun 2017 18:31:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751195AbdFCSbj (ORCPT ); Sat, 3 Jun 2017 14:31:39 -0400 Received: from mout.web.de ([212.227.15.4]:62078 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750991AbdFCSbi (ORCPT ); Sat, 3 Jun 2017 14:31:38 -0400 Received: from [192.168.1.2] ([77.182.192.46]) by smtp.web.de (mrweb002 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MfYTr-1dVtSl0TG7-00P2Ch; Sat, 03 Jun 2017 20:31:12 +0200 Subject: [PATCH 5/9] ARM: OMAP2+: McBSP: Delete an error message for a failed memory allocation in omap_init_mcbsp() 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: <57bb7074-8283-23fe-6112-822bd40098dc@users.sourceforge.net> Date: Sat, 3 Jun 2017 20:31: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:bnqsnt2wfL/fzaLK5bQdF7Ml49+iKNhVTloQOqw0zUnVYZJRabO H/WnkuqMInQ2+lRjEblH1sZUOyK5J0etFUCEulR3/9/4We7OAFBozfLdTafdhiD9A0xMRu6 xffEtjSloRRa6210S4n++AbxiRSlUQDk3J13YZnZwDb847iF6z5c9JGpipoOonBm7izQs/6 q68Dzimul9jSuZalnMedQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:02UCJDW7CA8=:0P1M7UeivtBIaxgjsbZARZ 9NaMWxglgLpoxThvey4nmhQeRguPL5+FkpNKOOcXrplTs/MJhZ97LQolKjxXmXucawE4Fnci8 vBNKPis++GoIS74ia9lTYqbHMvAJDHSUQ6NC7/rgKX3eGmprOfiuusH9o/HmCmD/m6zApdDzO TFblEpdq8rL8yehJzKgIdrbMJiYB6RhtxODpA7WqiCgloz+E6xrdKs6/qiuZUY1AsI0kEQFib FT6pduJPgdGt/DO/FNZTOW3maGdbAagX3fKUOMNBoMupoOI5paoVlahRiXP+DMy4oRejaPGkv wOqYhge6FwdlabZ0Kgy2r7DtfqtdTbsuWT4a+LyJrTPON7QJbo0ASAiKzbPYwoeW2911oyRT6 hVoG2J2f1ZcQUBg9EAyCDMcMI/BzJzX5PGYThYciR+Cgwn7bJdBXkDID0FWZBN20R92Vm/fmR zNvk8nnF/j4cSzslvyTXPHLEyuenQJnPJV5tmq5mNbeC+s6cEcHdwaGWj5b8gGcXyHU9/GbMh JCbKlAll7jXykTvWenn9E+4XGrvPuD09/XeJiC+Zlc89dzhxaaDf6fcFz7b2DtHl0w1kPE6Y6 BcmRuKyemDsrxAX8rHnLdqkFTqXqGOrwxsslwduI6RAHHHY8qpOc7DpO/ktSc3/UOTINWWha5 DAigow9GM8+ysneWGc5XUepnPOMkRtgwhQtg83jcrRAcZudWdiQP8op29XOzIxC24WLtKfBBN umasrff7ZaO6W18LQrbMk6ekf/Id3WUoMNXJiA6PylclZefiKSgKQn2GDwXsPGOxBxLRTGQ7E I7QhKZ9 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 18:03:25 +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/mcbsp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c index 408793d14fc5..0372e3358ec1 100644 --- a/arch/arm/mach-omap2/mcbsp.c +++ b/arch/arm/mach-omap2/mcbsp.c @@ -68,7 +68,5 @@ static int __init omap_init_mcbsp(struct omap_hwmod *oh, void *unused) - if (!pdata) { - pr_err("%s: No memory for mcbsp\n", __func__); + if (!pdata) return -ENOMEM; - } pdata->reg_step = 4; if (oh->class->rev < MCBSP_CONFIG_TYPE2) {