From patchwork Fri Aug 11 09:33:56 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: 9895257 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 7E670600CB for ; Fri, 11 Aug 2017 09:41:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6FBD128B6F for ; Fri, 11 Aug 2017 09:41:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6495A28C19; Fri, 11 Aug 2017 09:41:26 +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 96ADA28B6F for ; Fri, 11 Aug 2017 09:41:25 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 0B6CC266CC8; Fri, 11 Aug 2017 11:34:15 +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 0CF45266CD2; Fri, 11 Aug 2017 11:34:14 +0200 (CEST) Received: from mout.web.de (mout.web.de [212.227.15.4]) by alsa0.perex.cz (Postfix) with ESMTP id 5EA6226648D for ; Fri, 11 Aug 2017 11:34:12 +0200 (CEST) Received: from [192.168.1.2] ([77.181.164.13]) by smtp.web.de (mrweb002 [213.165.67.108]) with ESMTPSA (Nemesis) id 0M7sga-1dSxEM3BFQ-00vMsG; Fri, 11 Aug 2017 11:33:59 +0200 To: alsa-devel@alsa-project.org, Jaroslav Kysela , Lars-Peter Clausen , Liam Girdwood , Mark Brown , Takashi Iwai , Vinod Koul From: SF Markus Elfring Message-ID: <161e9c4c-1c97-d06f-35ec-3f165ad9e52e@users.sourceforge.net> Date: Fri, 11 Aug 2017 11:33:56 +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:Ag9ovIkkVz3F0Lst+472r/38qMqVwdUVZk2KvlzmwtjzbKdNfih zZhXkInk63ahQF9IFsqs6iqZP/l8R9pKUR+2pCTrr3clKoguBpMZ+rc+/gc01v/AWUL6X2N pDjc3k/eYZ60XAG1S0kDdAfAA68kIRipp949FRJ/c0Cc7Cab+8aM+4Y5R/WFZuia9B62bXY hk312p+Eh2PHLckRabHQg== X-UI-Out-Filterresults: notjunk:1; V01:K0:XG1XTxI+gcI=:IE9vGZ1iNm5wXopAgRhtrd 0Dtb4OVF2AGV/pYRbGRkcBpJET78kZx+Hy9BgedJ/V/rr7A/3nodhB86dDcNps3FE6JVrB3gR TWhVsgXeSeZSnowtoq/M5B56RxLwCM1KSm1Bezi0R1ZeMtqGLDlPikb9b5v5tJsXMMKRQEPYi UlL0LK0KyqAEOvkreUgNepJgmDNuKPECThsaR+Ykd+JuPMV8yLAhSvOwLRYdtfXk34nGPvdYB I5r9UypgpMyuHJwb/i9pZa5Kmohej2E+hJNLzUmoP04xm3867ROcHy3cEL0mPMnAE2s7rqfF/ jpLZBbxKI81eyg06IC6hoWWQhwI+B2dRtwmnFivIur7cxCqIpSPJpKHNK6RD4MAnZDWVEjyTH kaMDrqzSilwNo6tlDQoFNq3p8fTKWHda97fqqGhD7wIKSNDf95KCawqb7YTBS7lN4e8xKRADx keMgAUmSTgEf9XYXznETO+qfVXF6hN1wx93cS9ViBkSJNpRcCg4RNmcEaUvQ4vfhhxgz40ikR D1GsayxOtE1ozaxwz57siRKcxsgU29HWWq2MH1FVy2iI/Deg3hoXUhwHkUKBpa5nlcoTZGgtl SU7CPZJxZyYvEmwn4jrpLC1ZSn0Bx/y+zsN/8cpCDUo9x4lhP1M4IyiWsZBkD8Ki7YHgFiAp5 Jn8juKL0saF3cG9lKwXz6ivNYRKjBsxzXaOjSoeRSY/AwA0tX3hl6aMdwg+ZcPRhkZUwnMnZ0 eUC8rhdavsrZoxGSCOymgcNY2lwwrtiiOtmKZqCnuds8FaGyvsaEgXpq22DnWSNjNbOqNU47d moD9xxlL2QD6w4ULMudkqpdNQwpX0+vc5OIR9NDn5L3jPGS9ws= Cc: kernel-janitors@vger.kernel.org, LKML Subject: [alsa-devel] [PATCH] ASoC: Medfield: Delete an error message for a failed memory allocation in snd_mfld_mc_probe() 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 11:25:41 +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 Acked-By: Vinod Koul --- sound/soc/intel/boards/mfld_machine.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sound/soc/intel/boards/mfld_machine.c b/sound/soc/intel/boards/mfld_machine.c index 4e08885f37aa..6f44acfb4aae 100644 --- a/sound/soc/intel/boards/mfld_machine.c +++ b/sound/soc/intel/boards/mfld_machine.c @@ -376,10 +376,8 @@ static int snd_mfld_mc_probe(struct platform_device *pdev) /* audio interrupt base of SRAM location where * interrupts are stored by System FW */ mc_drv_ctx = devm_kzalloc(&pdev->dev, sizeof(*mc_drv_ctx), GFP_ATOMIC); - if (!mc_drv_ctx) { - pr_err("allocation failed\n"); + if (!mc_drv_ctx) return -ENOMEM; - } irq_mem = platform_get_resource_byname( pdev, IORESOURCE_MEM, "IRQ_BASE");