From patchwork Thu Aug 10 13:01:46 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: 9893699 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 0FAF360236 for ; Thu, 10 Aug 2017 13:02:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F385928841 for ; Thu, 10 Aug 2017 13:02:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E857C289D9; Thu, 10 Aug 2017 13:02:31 +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.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM autolearn=no 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 2C3DD28841 for ; Thu, 10 Aug 2017 13:02:30 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id B79EC267532; Thu, 10 Aug 2017 15:02:27 +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 0737D267535; Thu, 10 Aug 2017 15:02:27 +0200 (CEST) Received: from mout.web.de (mout.web.de [217.72.192.78]) by alsa0.perex.cz (Postfix) with ESMTP id A32372665D5 for ; Thu, 10 Aug 2017 15:02:24 +0200 (CEST) Received: from [192.168.1.2] ([78.49.53.238]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LkhBY-1d5dSp1fnA-00aUHa; Thu, 10 Aug 2017 15:01:47 +0200 From: SF Markus Elfring To: alsa-devel@alsa-project.org, Jaroslav Kysela , Liam Girdwood , Mark Brown , Takashi Iwai References: Message-ID: <5742ec2a-2f88-717f-7286-aa0cac1bcb9c@users.sourceforge.net> Date: Thu, 10 Aug 2017 15:01:46 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-GB X-Provags-ID: V03:K0:8iYk2UEw8VCbQ8ikH8MCQCvrdZwwtNSiV+I3BrCZhrZXXua+6v8 k1hwCV5YHCu89RUkjmbLuFsAf3ZLoAm/4CcTTRJKMouRLwi3rkDc/aVQLohi91srD77t/sb cvmDVaXAhLkbk3l3P7870ZlVzW1jbFMQJ10ykmcdWC7AXMeFt3ogkub85T7ukiRLW8HFyrB B7+0q3ILfFem0XTBqFU1w== X-UI-Out-Filterresults: notjunk:1; V01:K0:AbITIQc2Awo=:vFpzn08uUdG7jHCaOm/TAz H8PRlDErR1RGa2fCAsaqD83WYiLWly0dojxIf0mJParHb7dRIdQFVeKmSVrIk4q3+Ft8F3Dd0 qTJv3P2OVHGYa8+3+8bg0tWq9zpqb/iDj/jEkEXvfYfBkKmf/3Pt67bkDPtfOVQkc/qssnPS4 5kJ+KZTxaZQkYDoF3wFGu1be24Zxi1+ADMqMFTwQapIXeKe3zxadXlJ2QZcRM60YDyWx4ZX7l 1xOceNrqPerQknaDE3bhWQ+cg0/1ir2oADtj14CW+4Ki9F9ZKDErev5N9GGxf6OmMdZUAT8CB fUUbZaW4ASUnsl+1xQ1hSq9x0BTt5L3/FdoBHGtlWJNVEuIEjGAIx9+Q5KAz40eLAlPMZ4DZN 5CwMGEESnpR/xuV/hY7TxhvtifO1TzHkukyM9tzy6nbk+btRq2IbLEtGfGJlXGxcVHxNwgfAO g193moBRDaZcTmuNck8/5UIGpLhHxb1TQkTuKJV+enAbsMBinbbiU9bv+GcHlgSI+EQsc8ZNl 2OYyPYLKwivJW/j8Y2EpLW5nmuSZijXxo4Q7v3WU8fXdvUJwZbXKVSJbdt7E2PqCQvYKYOg9E tsQGDe9uYUVIqVgo9Ub6usUykEb+B22pakkNY3+TOgkcjddLqTGpJM1UH21Z5ck+EjGV9ssTY uCE87oO71iJVFMdzAsUvtV0tI7nsyayupVs+E08YQ/wSvQVOh5O0S3scURbu77kCqdLBgsJwU 1SOT3yc+heEMo3G3hpSuqxxAqbBGFt489qq69w6EfzRbo1LCWVPB9s6pwcQtsrsK1ZSAF4Kyb 99KZGCjBRdPqB+SgB4iGDn/sC4TRjbbqYrhJGPnajrr5aQU310= Cc: kernel-janitors@vger.kernel.org, LKML Subject: [alsa-devel] [PATCH 1/5] ASoC: dapm: Delete error messages for a failed memory allocation in snd_soc_dapm_new_pcm() 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: Thu, 10 Aug 2017 14:09:19 +0200 Omit extra messages 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 --- sound/soc/soc-dapm.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index dcef67a9bd48..3adb914bc009 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -3854,8 +3854,6 @@ int snd_soc_dapm_new_pcm(struct snd_soc_card *card, (void *)(kcontrol_dai_link[0].private_value), sizeof(struct soc_enum), GFP_KERNEL); if (!private_value) { - dev_err(card->dev, "ASoC: Failed to create control for %s widget\n", - link_name); ret = -ENOMEM; goto outfree_link_name; } @@ -3866,8 +3864,6 @@ int snd_soc_dapm_new_pcm(struct snd_soc_card *card, sizeof(struct snd_kcontrol_new), GFP_KERNEL); if (!template.kcontrol_news) { - dev_err(card->dev, "ASoC: Failed to create control for %s widget\n", - link_name); ret = -ENOMEM; goto outfree_private_value; }