From patchwork Sat Aug 12 16:51:51 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: 9897399 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 DD6F760351 for ; Sat, 12 Aug 2017 16:52:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CBE0528A01 for ; Sat, 12 Aug 2017 16:52:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C06B228B18; Sat, 12 Aug 2017 16:52:04 +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 C9C0A28A01 for ; Sat, 12 Aug 2017 16:52:03 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 9845B26701D; Sat, 12 Aug 2017 18:52:01 +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 AA134267028; Sat, 12 Aug 2017 18:52:00 +0200 (CEST) Received: from mout.web.de (mout.web.de [212.227.17.11]) by alsa0.perex.cz (Postfix) with ESMTP id 15B5326701A for ; Sat, 12 Aug 2017 18:51:58 +0200 (CEST) Received: from [192.168.1.2] ([77.181.183.107]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MZDTE-1duxG83Wn6-00Kwqq; Sat, 12 Aug 2017 18:51:52 +0200 To: alsa-devel@alsa-project.org, Arnd Bergmann , Jaroslav Kysela , Julia Lawall , Takashi Iwai From: SF Markus Elfring Message-ID: Date: Sat, 12 Aug 2017 18:51:51 +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:mKA2DedtSGuJhASqLoz29XwguirSmBE9H5XeFA73GlRgYjb1rat 5z7UNtbcmQCKcWeKDeiFSmcP3Zybvz+kpxZxaOXAlJlweV6tndFJg+zUV2MqT8exnOCWoo8 kp2BL92uz2MGztfWgohmuUNwlrsU3A+QtfKyxjLb5QNB9KGEDQ8aC9ApQ8qxah426CeuQy5 GGOpOS7O4bMp/mCwBuY5g== X-UI-Out-Filterresults: notjunk:1; V01:K0:SIp/ZDHmzR4=:+ynmid6TVDC33ggEv72o/K 27tb8j8V1I90GD4FsJ1PwN31SLcSvbzqVLWbeV32bFbpDSg/DQB43qdxqFpJpoKh+zJfgV5H5 jEre8YuqmHWbvoBBiVAvXACheloQw2Z2Zls/XVqni9xQ0tNgJ7QijvzPMrk62WuVIUnYyOgq3 YHX3pw2UIHWe7vL2asC3yOzRB4ywy6OdajSCWxK0m+1GLuGnXUckHlM1AgBFy0nnIQWIMUKgG jaqMq671vDnZnt7K0x+7RgnKKlnHjaOstX13li4GjS1jmIsvp9FfnsrgANAF30/GXJne+Lpib xab+AVSX0I9//PZNx5nwyvNHskAFPLAH9CzBDsQ9WAbzlgUCYAf6d9kj1p/VFQ4LectisHCy+ 0ExofLc2t+LMAodhhD3sGgVlNsFSZtG9/a6Nn6/a/hGYWJgUAr+IFCQ2dkGkYItjcY62LEpV1 86sd3BtPbKn5X8hhLi1E3YCJ9XOyOCLnsL49NYS7cMSG0KEcQ6AvxCSUdga+AiORsBUKM97HO 9vVi2CHm1ZWXUBp/aV85L5YaOrs/sopqYpbKcCqrECiA6rXT0FfhMH4sl9c6UoxRnww4D1BpJ wzW2Q3FGugsUlAcSi1a7vnrh3s2qUCXxju9hoerp7v7VzHOjGUhhyEX+UeyTGlT/iPKMO5nyi 1V71okmyt0xSXZ/wPv2zGiph7UFs5fpFvyWP0GMnkoMmsSqbXaT8W4V+yo/K8uO50hyLVX6pf 9Kr5mqh/prqR3cbd1JaXSockVqRZ7mjVGu+MJK8MnItfVpdh/xbe08y7ff8hLTvndYzaOtXjP 5vlrxe2/if3MpDfcHjuOy2f1yjorxHJAGzTOuGDB9UskA6TwFM= Cc: kernel-janitors@vger.kernel.org, LKML Subject: [alsa-devel] [PATCH] ALSA: mixart: Delete an error message for a failed memory allocation in snd_mixart_create() 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: Sat, 12 Aug 2017 18:45:42 +0200 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- sound/pci/mixart/mixart.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c index 6d7fbf30618b..84f6b2651bf3 100644 --- a/sound/pci/mixart/mixart.c +++ b/sound/pci/mixart/mixart.c @@ -1052,10 +1052,8 @@ static int snd_mixart_create(struct mixart_mgr *mgr, struct snd_card *card, int }; chip = kzalloc(sizeof(*chip), GFP_KERNEL); - if (! chip) { - dev_err(card->dev, "cannot allocate chip\n"); + if (!chip) return -ENOMEM; - } chip->card = card; chip->chip_idx = idx;