From patchwork Tue Oct 3 20:13:19 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: 9983439 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 B52D260365 for ; Tue, 3 Oct 2017 20:14:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BF02528329 for ; Tue, 3 Oct 2017 20:14:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B3F012896F; Tue, 3 Oct 2017 20:14:14 +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 64D4B28329 for ; Tue, 3 Oct 2017 20:14:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751784AbdJCUOB (ORCPT ); Tue, 3 Oct 2017 16:14:01 -0400 Received: from mout.web.de ([212.227.17.12]:63975 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751756AbdJCUN5 (ORCPT ); Tue, 3 Oct 2017 16:13:57 -0400 Received: from [192.168.1.2] ([77.181.6.116]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MQepd-1dtaG53gFx-00U4bU; Tue, 03 Oct 2017 22:13:21 +0200 Subject: [PATCH 1/4] ARM: OMAP: 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, Aaro Koskinen , Russell King , Tony Lindgren Cc: LKML , kernel-janitors@vger.kernel.org References: Message-ID: <3c43886f-b3ad-26ce-eab3-390e7f483d08@users.sourceforge.net> Date: Tue, 3 Oct 2017 22:13:19 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-GB X-Provags-ID: V03:K0:cA3qua7XbMPoXPe91vKgQ4lmgQNfIyLNgII6zuks/SFjOzInvfv J+bw+ISCYcjF9a6Tc2hSLMf5q9dPvmqsaZOZro6uOhAwEIpEXfBcgwOan97/nDM3N8qMrVK tSJnq2x1ZK2rYjLOpgsL04vfL86xW2/TcMZFwqjvbn8hy4VsoQGBLXZB1UQp+4f5NAZfsY5 oIox1qNofIW5mpWGGndTA== X-UI-Out-Filterresults: notjunk:1; V01:K0:05/sDnlESFU=:/QVtSZ8pG0TdSMT0lRcJd6 BY2+7fNLSDs/i5gIl6mOQgpPftdLvSLFnNScsLPi+RBpgYkU/mKR4/xJ9DjIicuKkRi8tt2gR 0p/UtlY9jiedpg5LNK/95KB2qkaDgziKdXVOVneskkHDqhnwIZybc2lpchTwMaH/YHF1d6JsA LRhocCU4veXS8yvrzj93keoXXjD+AgefiwdHPTvRch5xAYPapVzZrOwPPojeRzLzwb1MshzR5 BzbJR5J3r8E4bCUyPXESYQl8wld4130+jgzORhzVFAfJ4wt5OonOg3Sl2mPzOiOYYZa4nhcmu Q4rxyeNdKvYOSV7aSJwzxZhrI4//R5iHYBw6pHUE7U2G8/6oTAiC1XBwIxm9/HxpM+ul7BND6 mrIGfWAJEkrs6XzR6y3+dIIglpEhmBWdn4qxrORxkqKFMXyBIxrcLjXlisANmKPFdIdSVljTN 01g3FUBL1rFfy0bb5WJ1jdkbljbURsYBnw8YFQJJNzJQjrAy4Gin2Ho0k9aj2JYw938M+wakI 1yPGMY8+6PYYbUFiQgmvNnrEquEKJm0Sh0cAgSdRXA+w/M2/3aUGDFGcytH6BAjCv5y6gazGH 6ShWfuXRGyJc7+0U1iF4b06bvNKAaRDInib5dCi1d0TycWl/xL6yO7iEUqEkrqAFcwGfHGZGj g2GKOjOmcUhSOB8DCrHkJ+DQ6dYdtNP7v70/hSPm+4P4lXjVRJB/TwLcUt/VDzP/CghmNpadk rxzyhBEG/jPi+hTbwOvtsJl91zmS1ZFxYDu72ZvEx/g0z2OZUYes4sx7dD8xApsSeyDpW3kwm nvfU2ENRQ9+BjzXnm2DQtFekAa8clFg3u4bmuRD5kW1m375ayw= 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: Tue, 3 Oct 2017 13:10:26 +0200 Omit extra messages for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- arch/arm/plat-omap/dma.c | 5 +---- arch/arm/plat-omap/dmtimer.c | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index 1e460b4ee3b9..6ede0427548c 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c @@ -1317,11 +1317,8 @@ static int omap_system_dma_probe(struct platform_device *pdev) dma_chan = devm_kcalloc(&pdev->dev, dma_lch_count, sizeof(struct omap_dma_lch), GFP_KERNEL); - if (!dma_chan) { - dev_err(&pdev->dev, "%s: kzalloc fail\n", __func__); + if (!dma_chan) return -ENOMEM; - } - if (dma_omap2plus()) { dma_linked_lch = kzalloc(sizeof(struct dma_link_info) * diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c index 7a327bd32521..446ac0e3a35a 100644 --- a/arch/arm/plat-omap/dmtimer.c +++ b/arch/arm/plat-omap/dmtimer.c @@ -858,10 +858,8 @@ static int omap_dm_timer_probe(struct platform_device *pdev) } timer = devm_kzalloc(dev, sizeof(struct omap_dm_timer), GFP_KERNEL); - if (!timer) { - dev_err(dev, "%s: memory alloc failed!\n", __func__); + if (!timer) return -ENOMEM; - } timer->fclk = ERR_PTR(-ENODEV); timer->io_base = devm_ioremap_resource(dev, mem);