From patchwork Sat Oct 1 07:50:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9360097 X-Patchwork-Delegate: snitzer@redhat.com 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 88A80601C0 for ; Mon, 3 Oct 2016 07:13:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 72A8B289A2 for ; Mon, 3 Oct 2016 07:13:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 676B7289AC; Mon, 3 Oct 2016 07:13:54 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from mx6-phx2.redhat.com (mx6-phx2.redhat.com [209.132.183.39]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 13AEC289A2 for ; Mon, 3 Oct 2016 07:13:53 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx6-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u937BUCF043071; Mon, 3 Oct 2016 03:11:30 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u917oqiw024968 for ; Sat, 1 Oct 2016 03:50:52 -0400 Received: from mx1.redhat.com (ext-mx01.extmail.prod.ext.phx2.redhat.com [10.5.110.25]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u917oqqs009665 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 1 Oct 2016 03:50:52 -0400 Received: from mout.web.de (mout.web.de [212.227.17.12]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7F75266850; Sat, 1 Oct 2016 07:50:46 +0000 (UTC) Received: from [192.168.1.3] ([92.228.150.161]) by smtp.web.de (mrweb103) with ESMTPSA (Nemesis) id 0LlFDW-1bFX8f2E1W-00b5Pq; Sat, 01 Oct 2016 09:50:43 +0200 To: dm-devel@redhat.com, linux-raid@vger.kernel.org, Alasdair Kergon , Mike Snitzer , Shaohua Li References: <45984567-4421-5f8d-ddf3-eb2a769a1860@users.sourceforge.net> From: SF Markus Elfring Message-ID: <6bf7cb7c-13fd-f243-b34a-9efd0247a119@users.sourceforge.net> Date: Sat, 1 Oct 2016 09:50:42 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <45984567-4421-5f8d-ddf3-eb2a769a1860@users.sourceforge.net> X-Provags-ID: V03:K0:NfbAZAkz5pY9GwFy/2cHDaba+5XLSuPFk3fU4jxF1wHQ+1I9FT+ XygbkgvuVsuYAzBoZQxneDbNY6bmXbv80GQ0TPxOcZfETFzyAbmEwmjXZrnO6KEAN1YSEDj Wqh9uZ/n3MdfezdlReNaTQ/TJf8DF/R8Aj6/toAo1cDuZ6lIFSKx9TMAfruyk1QANUw6MJF MAgNYwkFntDWsdzdoSiAQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:uESehjrhwsc=:G7cFZE8cLxnqR4vcG/iDs5 97n8Yp0yi5YsM8qZmFEhkShyb7Pf3jaOovPGSFWzrgI46RZSvMagmSBRHflETrLP+qwC1tUk5 LefY+w3fxNRIJ0KucaWbdMhmce+Q3As0CqndE3c2XO4gU+WceNnF5mjPptTrvqN80YGsbhaUv fqw65NijuoN8JxWMuv6KWLnpEy/C13zqDxDOsPQma0rPNUpJKPPbb2BDpBWpypaiuU5J2xBGc 8//kHp3N6AbcNj6g6EbIBSLHKiSAEr41OOMSWm6uO5UbNZrQCUx51LMoYckALzgiCSdiX5hbp XLHumb7x1hzHq92mA0yFLitu/BVtOb0YvDtAD+ty95yjwAwS992sa/u7VIUZLN/Hn1v5huCMX /jwWqJprdr8xpVzzPQQwqujeEcoMnL+9EqogvFCCF9BFtRJEE7WKzEgMiP5ussaILMNBtJqhr PorEwLeCV0LN5qzk9M1exum5I7EwJH1+d5YHSCfkiaK3lC+zTUF1oRyVFFk8GYsJ7iE06f1XQ 1d6hSZwivwaREgJEZdO+e9Btc019TrGHfAwx7b+Ngw7CfYyHHTVmm6xKN7CNf/CO2ICSeRocp B9rmwfD6CJM9eZw3OaMn1UGytfiwbFncqbusTMFQqEhB16px7kT/M1j/6Q8LxvOWwy0gEY7Yn LB2BN3EW2UerDnCIW5Q0SYbh9W0tL+h1GzNzzHwHufTSzHT1cixEtOuSVg5IOaEbBM6QgTpYR gKlXswtbcd2FYjpDtVoRUIKKKzq3m5idkvw8eCWYn6Y8MwcCxMHco71D5bcKat6qy+xJulurv NQtwl4B X-Greylist: Sender IP whitelisted by DNSRBL, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Sat, 01 Oct 2016 07:50:47 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Sat, 01 Oct 2016 07:50:47 +0000 (UTC) for IP:'212.227.17.12' DOMAIN:'mout.web.de' HELO:'mout.web.de' FROM:'elfring@users.sourceforge.net' RCPT:'' X-RedHat-Spam-Score: 0.079 (BAYES_50, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS) 212.227.17.12 mout.web.de 212.227.17.12 mout.web.de X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Scanned-By: MIMEDefang 2.78 on 10.5.110.25 X-loop: dm-devel@redhat.com X-Mailman-Approved-At: Mon, 03 Oct 2016 03:10:51 -0400 Cc: Julia Lawall , kernel-janitors@vger.kernel.org, LKML Subject: [dm-devel] [PATCH 7/9] md/dm-table: Adjust one function call together with a variable assignment X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Sat, 1 Oct 2016 08:53:37 +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 --- drivers/md/dm-table.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index 9b7d8b7..40dde87 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c @@ -407,7 +407,8 @@ int dm_get_device(struct dm_target *ti, const char *path, fmode_t mode, if (!dd) return -ENOMEM; - if ((r = dm_get_table_device(t->md, dev, mode, &dd->dm_dev))) { + r = dm_get_table_device(t->md, dev, mode, &dd->dm_dev); + if (r) { kfree(dd); return r; }