From patchwork Sun Aug 21 07:29:24 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: 9292071 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 25C99607FF for ; Sun, 21 Aug 2016 07:30:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1ECAF28A05 for ; Sun, 21 Aug 2016 07:30:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 132AF28A08; Sun, 21 Aug 2016 07:30:19 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9AA5C28A05 for ; Sun, 21 Aug 2016 07:30:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752376AbcHUHaC (ORCPT ); Sun, 21 Aug 2016 03:30:02 -0400 Received: from mout.web.de ([212.227.17.12]:53694 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752029AbcHUHaA (ORCPT ); Sun, 21 Aug 2016 03:30:00 -0400 Received: from [192.168.1.3] ([77.181.85.179]) by smtp.web.de (mrweb102) with ESMTPSA (Nemesis) id 0LfzxX-1anCXe3LIZ-00pfC1; Sun, 21 Aug 2016 09:29:26 +0200 Subject: [PATCH 7/7] aacraid: Apply another recommendation from "checkpatch.pl" To: linux-scsi@vger.kernel.org, aacraid@microsemi.com, "James E. J. Bottomley" , "Martin K. Petersen" References: <566ABCD9.1060404@users.sourceforge.net> <40d8607f-3934-c31f-3791-ef6a67d65d45@users.sourceforge.net> Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall From: SF Markus Elfring Message-ID: <03ee5f77-5866-1186-b160-bb5141848865@users.sourceforge.net> Date: Sun, 21 Aug 2016 09:29:24 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2 MIME-Version: 1.0 In-Reply-To: <40d8607f-3934-c31f-3791-ef6a67d65d45@users.sourceforge.net> X-Provags-ID: V03:K0:G8TTBpHqpb15lP+CfYGMsSO8nmEgd5lUiEOO6ETkVuwzt3AF5Wt feAZc/zlaxnA4KvEpJNtixWUc226qMItJiRTt9GGrtcByOw8iYJu11UOZQSgr9TG1e2nO76 fIJQnOKcd0sq5fstg6DiSNSOMgUQX97cKe8eUpFbrLFHgyB2mnmf7QUEZh1Y8sLRtJrrK0H JZg3CT4ckHGv+53bfF98Q== X-UI-Out-Filterresults: notjunk:1; V01:K0:hFX8CPbuHP4=:eiDMzZbiNUzYeWmFgIzP77 ufHIeD0OIFvthXX0e7qMqSSCr9q4E5MRAMAii1QKrsudTn4z7Y3Qj7rjg1/lZDg0Y57LfI/De dTVNwPdG3Ke+IO9P0SNfe+DSir32GxuAnH7dTr7HVE1R3CEBQele/3EHmZQ7BLcrRuzHuUJtq U+fj6uwi6wZFm6dCvsQ/DeBBrQY9yYd69j88BXayMLjYexikibJtj+YIpOCNBMRWtqf2MkFkq FIZ6XhJSfRqGMuMNO4CN+krBNFnuddx9KoxNjO5n84KIuYh5/G81bi9/QgR2+zmvj/5ECWx7/ FzA2zuWsgZPp7+at1vTcPiC+NVf/cYkf3Nj6i+R9M8104aubSmZaRfpT2Zv/v369opQnT0NCH uON0JoDABrVeGzUlFi70KDD2OHS5tZgN40ejGzSXkd4fiYoVPLc1eVl9wauon/3CJ8GyAPDoB YKln9A9bopNCYDXOAZrrEpoPvB9B6+kg7xWHf9WbA0GV0JYUk/gjAq5vA1uxq5EPBeAqqTCMf zYUQdRyu+KKx9b7NNNVau3UBZLpDo/tASe/vFOBz23EXLnzgp6+/+V1GQRTFF2OvdC6a/Cn0/ Vf3NSahPgufLfG5nGmMB2/+DjPlU8NkET5G2fETJjSfIc+2eoH/a9ULK/y/GxKNxCNIpr3dOS 3ntGwlj9xCgX6Ahiku8LwQrGzkMC575r5z6iGzWrqLdWwlhZs9AZt+EWadKWuxuNBwKdgn6Nc 28p4j4+tz6IjvBSUVE0wTJqmNi3dEB5fY929wInRZz7t+hiS2zus3Hk+E1JKPRF4kUSI0rmQg Ho3DoNe Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Sun, 21 Aug 2016 08:23:25 +0200 The script "checkpatch.pl" can point out that assignments should usually not be performed within condition checks. Thus move the assignment for the variable "srbfib" to a separate statement. Signed-off-by: Markus Elfring --- drivers/scsi/aacraid/commctrl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/aacraid/commctrl.c b/drivers/scsi/aacraid/commctrl.c index d2029db..7e6c76d 100644 --- a/drivers/scsi/aacraid/commctrl.c +++ b/drivers/scsi/aacraid/commctrl.c @@ -499,9 +499,9 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg) /* * Allocate and initialize a Fib then setup a SRB command */ - if (!(srbfib = aac_fib_alloc(dev))) { + srbfib = aac_fib_alloc(dev); + if (!srbfib) return -ENOMEM; - } aac_fib_init(srbfib); /* raw_srb FIB is not FastResponseCapable */ srbfib->hw_fib_va->header.XferState &= ~cpu_to_le32(FastResponseCapable);