From patchwork Wed Aug 9 08:01:55 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: 9889797 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 30C90602D7 for ; Wed, 9 Aug 2017 08:02:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2306E285FC for ; Wed, 9 Aug 2017 08:02:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 17EC728A1B; Wed, 9 Aug 2017 08:02:41 +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 077C6285FC for ; Wed, 9 Aug 2017 08:02:39 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 9DB8B2673E2; Wed, 9 Aug 2017 10:02:38 +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 D91512673E5; Wed, 9 Aug 2017 10:02:36 +0200 (CEST) Received: from mout.web.de (mout.web.de [212.227.17.12]) by alsa0.perex.cz (Postfix) with ESMTP id 2E3C22673DD for ; Wed, 9 Aug 2017 10:02:34 +0200 (CEST) Received: from [192.168.1.2] ([77.182.172.151]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MGRVU-1dsbTC27wO-00DCpb; Wed, 09 Aug 2017 10:01:58 +0200 From: SF Markus Elfring To: alsa-devel@alsa-project.org, Jaroslav Kysela , Kees Cook , Takashi Iwai , Takashi Sakamoto References: <412aa3a5-c8b6-c1fe-febb-0d62927dacc2@users.sourceforge.net> Message-ID: <697dc142-6d2a-f39f-19bb-54c8eeea454b@users.sourceforge.net> Date: Wed, 9 Aug 2017 10:01:55 +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: <412aa3a5-c8b6-c1fe-febb-0d62927dacc2@users.sourceforge.net> Content-Language: en-GB X-Provags-ID: V03:K0:BwQf6mt7COlD9SKWlG03x8EtOY8n7mXuCuV3UIO3RAcVqNKeKiJ 9D0GOWTwkQXP0L2p0DY7JaIoHZpHX2KXi9MHwPl8JEtZ58zuyuJYaJY6s44afLpysYhkZo6 n4eD/sGuwKEL/vzeZaLHsnxOXZD3J4f9aEnH2gjJAywXrAdYRDx4UkjbRgC1ACiSs5/9I2c ar4iaxpemtdSAto0/Yteg== X-UI-Out-Filterresults: notjunk:1; V01:K0:ArKgMXOTYx4=:3ahuxjSoaUBKXCR5yW5AAa NhQJhfKKVyF7VOsolUDlZffj/OIv5yvqnAVT3AzWDwQF31s8PrCEtEs7VsYZQchbmMiAt8+dZ TF1LmDvhLkWHAd7j5JI2P0fnoAYa6MM6U2NzglLp40ryyeZXt/PVex1utpYPkrWunrnq3vk4/ S5BhL0Y7ljyNvK+mOSEvsAQKM886V4VEeILEs940yNcvtgTKIH3vhQJVgG3gC6qOXB1J+Hhz6 htwU6LCbFgeaNl39dcqRExUBuVLaXN+N7N+LO1g9FfWDccQwxGrRv/7L11lt9W8aH1p96UmRN FaEDJuhNQiUr3aHeFmOe1i9X2+ru+y0dxmU/5jM2x3e48IZSIjdMQcscdtny0DksDEA47lqxC p46iSRtUlUU89Taot+Wmpfj6ra4EaG+glQfctxGdlALxnGHu9sJFjdtsRZ2hFchPWeCu8HfUZ C+tFSWRZTtxtikAgvTJ8qu3f2ZcYEMSjGwH1WDH1/0+tdtFRKxBGb4qpRl4ANHticJdYvRHLe XWIMlNyAjfEcPiCX+MHvSj613OtDkKVkrBKMpHq/4at5zurIMkcC08v+eP1StQUefL8VEmRpO Z8lVtmw2s3mP5oRAWpu6lCZbw9TKizNa9jT2b/syMsVE1owR1jGawu4YcejBd3eHDlR2CqFLJ GsbzYnIDfwh/ldgxduQwQsoMp8CRZ+uBRMFPS7fwmYGtgHTzYFPPezamSfgmQonURzaxNoZgD fznMYWswz70GRG/ED/s+fi5SMsUzMuG5SqglVQFXuMyKvmlclv23FWRpL1MGRZJFlzuEzVk5a g/tcunmtw0U6Etf3C6KwoHwuYDgdU1NzqUsO1IcmiHw3zgY7Zk= Cc: kernel-janitors@vger.kernel.org, LKML Subject: [alsa-devel] [PATCH 1/4] ALSA: emux: Adjust one function call together with a variable assignment 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: Wed, 9 Aug 2017 08:40:14 +0200 The script "checkpatch.pl" pointed information out like the following. ERROR: do not use assignment in if condition Thus fix the affected source code place. Signed-off-by: Markus Elfring --- sound/synth/emux/emux_seq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/synth/emux/emux_seq.c b/sound/synth/emux/emux_seq.c index 55579f6b8cb2..53820f75ba3e 100644 --- a/sound/synth/emux/emux_seq.c +++ b/sound/synth/emux/emux_seq.c @@ -144,7 +144,8 @@ snd_emux_create_port(struct snd_emux *emu, char *name, int i, type, cap; /* Allocate structures for this channel */ - if ((p = kzalloc(sizeof(*p), GFP_KERNEL)) == NULL) { + p = kzalloc(sizeof(*p), GFP_KERNEL); + if (!p) { snd_printk(KERN_ERR "no memory\n"); return NULL; }