From patchwork Fri Aug 11 15:08:03 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: 9896203 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 1395F602DA for ; Fri, 11 Aug 2017 15:17:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0411028C56 for ; Fri, 11 Aug 2017 15:17:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EC82D28C5A; Fri, 11 Aug 2017 15:16:59 +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=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0817B28C56 for ; Fri, 11 Aug 2017 15:16:58 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 821D826768E; Fri, 11 Aug 2017 17:08:47 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id A1BDB26768F; Fri, 11 Aug 2017 17:08:46 +0200 (CEST) Received: from mout.web.de (mout.web.de [212.227.15.14]) by alsa0.perex.cz (Postfix) with ESMTP id EAC1926768D for ; Fri, 11 Aug 2017 17:08:44 +0200 (CEST) Received: from [192.168.1.2] ([77.181.164.13]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MfHhK-1e0TXz24Dq-00OkTl; Fri, 11 Aug 2017 17:08:05 +0200 To: alsa-devel@alsa-project.org, Jaroslav Kysela , Liam Girdwood , Mark Brown , Peter Ujfalusi , Takashi Iwai From: SF Markus Elfring Message-ID: Date: Fri, 11 Aug 2017 17:08:03 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 Content-Language: en-GB X-Provags-ID: V03:K0:3mqiITE06n4RpD+3q5grANSCcfeVBX6nDIbP3vxTZ7a9RnPf7Fq 746Aus7l4ECILWtAItIWYbrQ1SlO10Aaa34dw/XTRWdUxypwdrN11XlaZa0YYtXO+WoizHk 1M1943fJF5A/QFtbm0n3jUQYv9pgIcWeVEgtNz+kyw67D2KAk+Sn81PLRmTVGQhiuCJrPyS G3A0B6nKPxORuQm0nfo4w== X-UI-Out-Filterresults: notjunk:1; V01:K0:1FdN6Xnh5PQ=:G16i/P3GPcwTyB+SbxcT8a aqoRmPXE+9P+/CGL+jmvMqBrtl/+nHVSAIaej6VOkYomJ3IJGBz26QncthftKOxaU/vw+mm8W At3c7BeMiAaJsqK98bn6hVrf8AP0j8Oj/x1LHWQCsGp/u1Yi4PmYGaqLsXJ75W1/PffB30Jhx MEHvfDMRNgj5IVOaSRibP3uYecj55q3SE0mSS5lPn5qHaAd7ykP0jmrDyjnlexYzLkvFl9Wg0 ra2BjUcd+dkeigETfM43MuJcUYtKsYDPpO9kmI4qsxyvuNeV2fu0/UfTiRiYuV/+nDPCZ9ShE jxxBAfvj+uT2EULkTr9W70s3HGA7LJMTgozZfWMjLMSWUzcCm+9+DmvXAQa5S84v3iOlECO7C 9LKIQvZbOKb2+oMaV7yWhSgPiQQHJ9LQwIJ4bv653JEadaWtbV1TStFiWWcCH+/I2kQyHHN2i VEU3G3WGMyJhP12qEKhCq/FbE8kJzynNLnRdkPq2Mjp1FQqVQzELMa/EXJai07t9xdZdN7rx5 yXyl1TEKdMQlaeDFxIu1ftkKzc/06ciGt4IUUapdTw2Y9O4BvSL/YR/C8DL+7UusTI2ZLnngC QB+sIB6PCPml5vA1JEuO07tgQWFB/RX70J/Cpkw9JwelmuBHdUb0ELyMSLHS8iy1IQRMzH5xJ ZWx/DxttX2KOWq+SYaJlgDSwx+Y8z4uisvOVeLtUqjpRoAypCeqcjnqcOaTP+xePmgarSXcAU 5m4eJxOsuJJXmdSJO9NM2iVlR1b1SNKqIEiNV3uKR4ay0kumbmOLwhBt5awHehpnWEGdw8TID c6F6/DXOUxvR86mBDcY1kRl/Ect54MZam6paGRdXx+zWqsvC2M= Cc: kernel-janitors@vger.kernel.org, LKML Subject: [alsa-devel] [PATCH] ASoC: DaVinci: Delete an error message for a failed memory allocation in two functions X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Fri, 11 Aug 2017 16:51:46 +0200 Omit an extra message for a memory allocation failure in these functions. 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 --- sound/soc/davinci/davinci-mcasp.c | 2 -- sound/soc/davinci/davinci-vcif.c | 5 +---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c index 56ec1d301ac2..d486908d4e0e 100644 --- a/sound/soc/davinci/davinci-mcasp.c +++ b/sound/soc/davinci/davinci-mcasp.c @@ -1604,6 +1604,4 @@ static struct davinci_mcasp_pdata *davinci_mcasp_set_pdata_from_of( if (!pdata) { - dev_err(&pdev->dev, - "Failed to allocate memory for pdata\n"); ret = -ENOMEM; return pdata; } diff --git a/sound/soc/davinci/davinci-vcif.c b/sound/soc/davinci/davinci-vcif.c index c77d9218795a..5415b72393fa 100644 --- a/sound/soc/davinci/davinci-vcif.c +++ b/sound/soc/davinci/davinci-vcif.c @@ -213,8 +213,5 @@ static int davinci_vcif_probe(struct platform_device *pdev) - if (!davinci_vcif_dev) { - dev_dbg(&pdev->dev, - "could not allocate memory for private data\n"); + if (!davinci_vcif_dev) return -ENOMEM; - } /* DMA tx params */ davinci_vcif_dev->davinci_vc = davinci_vc;