From patchwork Thu Aug 10 13:04:05 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: 9893717 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 D544F60236 for ; Thu, 10 Aug 2017 13:04:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C529F28ADA for ; Thu, 10 Aug 2017 13:04:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B9B0D28B2B; Thu, 10 Aug 2017 13:04:48 +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 F169228ADA for ; Thu, 10 Aug 2017 13:04:47 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 7DC1326753F; Thu, 10 Aug 2017 15:04:46 +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 69047267541; Thu, 10 Aug 2017 15:04:45 +0200 (CEST) Received: from mout.web.de (mout.web.de [212.227.17.11]) by alsa0.perex.cz (Postfix) with ESMTP id A399F2665D5 for ; Thu, 10 Aug 2017 15:04:43 +0200 (CEST) Received: from [192.168.1.2] ([78.49.53.238]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MVLak-1e7mmn26ta-00Yg7B; Thu, 10 Aug 2017 15:04:07 +0200 From: SF Markus Elfring To: alsa-devel@alsa-project.org, Jaroslav Kysela , Liam Girdwood , Mark Brown , Takashi Iwai References: Message-ID: <38a6abaa-8b6c-509d-468e-fa34cf81069d@users.sourceforge.net> Date: Thu, 10 Aug 2017 15:04:05 +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:4ZwtJ5fSa+YoinGrlcY/F+k8hhUzGqc0VGF3tS4BJ5s3lB3aBkP o2G1JHUhMwfdwoZY2QAuh6yzB9u88ql5JXytAg9fE8rHqnR2au63OYVS8BAlOBUwsqhKzps rK8adW/5LRNNAQ71aum86LfVqdtp3qDMzWdDEuly7qXxOks1qftaVjkdZOXiE/nnDg6Hny8 cKxUJtdVKPNBkcTkfGVVg== X-UI-Out-Filterresults: notjunk:1; V01:K0:XKXKBEOREqE=:G6zXvp9dR8ur/HLL+VwZMV 1cDdQ3Mu/LgwZMs4KZ75ceV5t4QfD+PN9wIaxqq6bxj/jFuMV/2Mi63U7U+K1g4Ny3FDzMr/a nBUf0pWMAIQ/hfZKER251Lz666gxwS6osW5/PGkXIR7ViRlih1Lmygbn15so128KswtNkuekJ Jr6eCGz+YFhVUDtm8mxhVqZdxGanOd/EgSAVIXcxPqm+5PFUJDGDiJs2TJoNOPDdqu6hKcPvW PM3cgRs3faLXy3Jw6LoKONsMp0MK0+fmAED8W4Wmwlglg9uBnyUm4/ZL7oPIZE/68jOVob3f9 Dje+bqKXn9iiTJYvkCKJMbBF+YyBK1d9/OIhYTXIrUnoai028QWw8XmPCkbFmNegPlPajhlHX VYIidXkdvK+jByUgq5BXfEoLTU3K7ah7gTzNJroCoQAPHeBOxdZwZXPEMtUfwUg0j9dV2srfj /N/6+i+McMrC2BlwBfZ8Is08QTmsGrBHVOoLy15TrtyOOIVq7gWdLU+sROquJ7MmvEsCuE7jI 4arGNvXkZi6hVMzfB3fsv8cYGnHdUnkL+rADQtIHJfIMNpLpSVLDl+fDpz+qnBdZGndE9qrwE EAGVYmBPjDaJIECswVnlofg+dETrf2kiDXDdpjIURHlJmx9kr8neGa6Bvsr/Lz5mRQXfrRJKN ZZ5k9PYOPHoAd589cLyuQgfd8pNgf7ByNkR3swaBfkahWmZa6y0QCtiqXlh/DH6THK8lB6Tgo RPT2HEUpsT2yE/hxBzP5mcTPvnlc5j/AypUIHFw+MnPIydJ/riI7OCdQSwpu5AmX3D2b3T5an xCmYikRdrfrEQcAi4wBQpdpDNo5nrHK8sC/J38ZJFqrBByMt74= Cc: kernel-janitors@vger.kernel.org, LKML Subject: [alsa-devel] [PATCH 4/5] ASoC: dapm: 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: Thu, 10 Aug 2017 14:34:35 +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/soc/soc-dapm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 3fa9f023bff7..4eea84d821c4 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -3441,7 +3441,8 @@ snd_soc_dapm_new_control_unlocked(struct snd_soc_dapm_context *dapm, const char *prefix; int ret; - if ((w = dapm_cnew_widget(widget)) == NULL) + w = dapm_cnew_widget(widget); + if (!w) return NULL; switch (w->id) {