From patchwork Sat Aug 12 17:15:58 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: 9897403 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 48E5960325 for ; Sat, 12 Aug 2017 17:16:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1F36E28657 for ; Sat, 12 Aug 2017 17:16:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 139FB28687; Sat, 12 Aug 2017 17:16:13 +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 5AFFF28687 for ; Sat, 12 Aug 2017 17:16:11 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id F26F3267044; Sat, 12 Aug 2017 19:16:09 +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 BF824267045; Sat, 12 Aug 2017 19:16:07 +0200 (CEST) Received: from mout.web.de (mout.web.de [212.227.17.11]) by alsa0.perex.cz (Postfix) with ESMTP id 3241E26701A for ; Sat, 12 Aug 2017 19:16:05 +0200 (CEST) Received: from [192.168.1.2] ([77.181.183.107]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LxOQ2-1dZags0QN0-016xGT; Sat, 12 Aug 2017 19:16:00 +0200 To: alsa-devel@alsa-project.org, Jaroslav Kysela , Julia Lawall , Takashi Iwai From: SF Markus Elfring Message-ID: <73511244-b12e-9756-6a46-89d9c56c75dc@users.sourceforge.net> Date: Sat, 12 Aug 2017 19:15:58 +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:W7cLDa1uqsVLNhF0wNN4GlF7wHTg/dKqAwY5sADhvET2dwyR4El s/aGV06Xgysbf6n84erWN7HUtBnntTBQb65GX0nid+VpqbR9SJHw976sS5SA/IvPABEPekp SP6IiT6uS2yk570EwXzk/YBI2jMpQNBLnfLI2ioi88iTvqTt8PvIWorrNXdylb99GmvVxqe ajR/gIMitIUKZTgDnbMnQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:/+oDxGesFSw=:JiEJN69R57zMm+gA35cbT4 kGqudRomZc6PUr7HYdeIf+TkdqiVy0IgEWA6V9LIBO5geRjgevwZPDn5F1F3QWz0Qd6Bo2nlC 2/hfgyz3dvYz8wOX4qjc7WQV7dK7Mwbd8mkvMi8+pKoVkQdkS5bkVyUc6xgwdm+GWSNAtndWl rLgbCiHfOcJlDJV0M7JIREKnMgkYazVhXekUiyI0fEHrzHPedaTMM53xYMD+ljd033WYwDahW rgpK96gZpA9rnwK5urkgYwRcMdwwiiBc8lNGKGzv6sSNd5T7LahbaO45ffLT1BAXpsqvVtkbG F4YDG9rmvCHDWAWlQM1y0YAisqLdFA4mn8AswZcB7CDPsq/iBXX98ysQ6hZcJbgO1pl8wn2VJ GAh0DwxtKXmYA0wIGvf8rrJ9wtviM7vam8+C8HGch7nH3WUIIugWHc+rYagWJjeIZ4B/k9QkZ zK+E6unasn4YKR8+mSf92x/3iGFn2e04vUJv5esp32MOXExALu/nH72GdF9TmmdeSqGF/I3uC vyqtfmYivW5zY25CJdVCuccf9XGVnoT9gFhedrV/zqOaMnb11SxTfD6nuum+SGh4JVT2m64TJ lQSonoWDKMk7No0EUWXrLV4RFKxS5ho6vdYLyfsU/lu9lLUWI/63i5Ojd7aZXEbqzfBn2z/4I eb3E+R6MqlMgh/f4xt1VlS8TpYGuyv/nhSBQM2SuCuDtDJMjv10ZBSdbxtvKjQlcIEf3TMEQS 6HXhQSYgj5ilyntRh96xuVBrlZfhrMC/zQiEGoVsfUs2nqzPzpzQHRPqoYqOShgIWNL6mVoHZ HZoZ4RyrfTBuMrK+kBOuQZ1H2AU8JjjpZyC67whRlzOW9O3BJw= Cc: kernel-janitors@vger.kernel.org, LKML Subject: [alsa-devel] [PATCH] ALSA: ca0106: Delete an error message for a failed memory allocation in snd_ca0106_pcm_open_capture_channel() 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 19:09:23 +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/ca0106/ca0106_main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c index 6165a57a94ae..b7783137af04 100644 --- a/sound/pci/ca0106/ca0106_main.c +++ b/sound/pci/ca0106/ca0106_main.c @@ -660,11 +660,9 @@ static int snd_ca0106_pcm_open_capture_channel(struct snd_pcm_substream *substre int err; epcm = kzalloc(sizeof(*epcm), GFP_KERNEL); - if (epcm == NULL) { - dev_err(chip->card->dev, - "open_capture_channel: failed epcm alloc\n"); + if (!epcm) return -ENOMEM; - } + epcm->emu = chip; epcm->substream = substream; epcm->channel_id=channel_id;