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: 9983435 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 5BD9F60365 for ; Tue, 3 Oct 2017 20:14:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 64F28289FF for ; Tue, 3 Oct 2017 20:14:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5900028A05; Tue, 3 Oct 2017 20:14: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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D70AC289FF for ; Tue, 3 Oct 2017 20:14:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:References:To:From:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=BJdGvmY8TAv2IgxFisO0jysCTzNZ2fDf4ZE3s625f70=; b=qzPYZrs52nwWMc 0QkloR/8jL9dRubxoYpTfV9e4K+CeanH4fB9983ueOhwPvgmQwEuVIVbCgkSqnlPyPuaoyaLUNM6w IjahU0Pb7sQZH+77DPOEblIBrrdfKrhpVf1wvgtY/y/VLuymmFbcJmvrg7PB2V+t9DBMBHZ8tAozc Sdp/3CLWvnFL3f/EdLhK0CjxKn1k84IoyvBsy6ku0U7NxbseyJyQOEOFKbX/2IU1NFBWz6qCNnq3R Eeyzxwr8MWhFS+w91XSZijTwULTplY698Q6ZU10s8OydQAbEoS2C+NDseN5ppcoHwwCcJ8VXq8540 14KMIn6vUNZPOkeyIo0A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dzTZk-0007Fl-St; Tue, 03 Oct 2017 20:13:56 +0000 Received: from mout.web.de ([212.227.17.12]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dzTZh-0007Cw-OE for linux-arm-kernel@lists.infradead.org; Tue, 03 Oct 2017 20:13:55 +0000 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 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+ISCYcjF9a6Tc2hSLMf5q9dPvmqsaZOZro6uOhAwEIpEXfBc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) MR-646709E3 X-CRM114-CacheID: sfid-20171003_131354_142852_F0D00A1F X-CRM114-Status: UNSURE ( 9.89 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel-janitors@vger.kernel.org, LKML Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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);