From patchwork Wed Jun 24 15:54:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 6668971 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C7324C05AC for ; Wed, 24 Jun 2015 15:55:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EEB542057E for ; Wed, 24 Jun 2015 15:55:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1CD2C20494 for ; Wed, 24 Jun 2015 15:55:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752796AbbFXPzR (ORCPT ); Wed, 24 Jun 2015 11:55:17 -0400 Received: from mout.web.de ([212.227.15.3]:58624 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752443AbbFXPzO (ORCPT ); Wed, 24 Jun 2015 11:55:14 -0400 Received: from [192.168.1.3] ([78.49.141.189]) by smtp.web.de (mrweb004) with ESMTPSA (Nemesis) id 0Lgs1W-1YmDqO2UQ2-00oEK4; Wed, 24 Jun 2015 17:54:58 +0200 Message-ID: <558AD2D0.6000501@users.sourceforge.net> Date: Wed, 24 Jun 2015 17:54:56 +0200 From: SF Markus Elfring User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: "James E. J. Bottomley" , Robert Love , fcoe-devel@open-fcoe.org, linux-scsi@vger.kernel.org CC: LKML , kernel-janitors@vger.kernel.org, Julia Lawall Subject: [PATCH] SCSI-libfc: Delete an unnecessary check before the function call "fc_fcp_ddp_done" References: <5307CAA2.8060406@users.sourceforge.net> <530A086E.8010901@users.sourceforge.net> <530A72AA.3000601@users.sourceforge.net> <530B5FB6.6010207@users.sourceforge.net> <530C5E18.1020800@users.sourceforge.net> <530CD2C4.4050903@users.sourceforge.net> <530CF8FF.8080600@users.sourceforge.net> <530DD06F.4090703@users.sourceforge.net> <5317A59D.4@users.sourceforge.net> <546E3DDB.5040508@users.sourceforge.net> In-Reply-To: <546E3DDB.5040508@users.sourceforge.net> X-Provags-ID: V03:K0:iMf56VtKCrnc1UOlboQr5HEOy+kv2FKfEvGS88UyEiftJE1B/th pPGx2tGZfGKbOKHGMihHh6Z996Y+t+W5hXdEotLVoPeoP7Ni0lrzwXP8uYK06jDyxwWZwDA +E2ICCGF8cQ4gVGb9CxCzNjo5T0qcHtrUp9twrm241UHo3CUNPuL3shwlhPu2HmcdAEHQz8 pi5oglD080V6EIyWB2nEg== X-UI-Out-Filterresults: notjunk:1; V01:K0:dEgw/5a9I0g=:+EiA5LMeCmPu/fBHKT6eWo VtF0OIpO4zvfpyolW93iCn17DodarGdFRD6oL/QpruUk9tY7+veu/Yv7AVujbA71uJ/EEF1cy iGiQJqVGjJ+uP1oSn+4pPiyZXjeOkcC5X3d735MFh4+hC3u9QfMpzA//hU3i5tPWt3hOG5Dv3 fbVKOiBUXXr4LJoQR2kpMWqDZ0c4wrh8lGwoPQfhcyyOB356WZ+1bEiSyEwicnWuBZapa5Ogf V/Q6d1KjvTxrVTIZA5xtrdcuOwcQkscLPLsMRUnkifUbt+c9nekGmIGjA6j0auRVa9hQ06Mk6 eR5LOsG4RniXF2U7zxKaRk0xPsBDcD5wklPwXCJeycOm3uhy8yG9vkndBiYve/OOhxT9SsBWJ W6r+B4gSlDzD2sajJjk30lmknM5m96qwnXEiqGxrUVCblxEr4lOV7bH3Sii9engIHzRmNuMl8 lipwoPxZkte2n2LwMK+LJpF/v66OaCIDuv7YNaK+c0Vv4R3hZJ6OQrBEtcxLxxsuhycPnAfdm 5JhpNYaPyfGdF0LQUZBxJTkyMYajiEEnR7m6two5/+QCBxkUFOWLIRXM+LZNjOKwTtX7cOkoB i+nAfT3a34kbhDfTQDUInejYdkegYP0qUZKHEH2UTOQyNtsHsYVBkMtWKtOSqfozokbCwBUmA fYSM2NYgtLd6VolNWwSqpzvJFxQOvRjM9dZ+vWTeqBY5au6TL3tS2eJWSBpeM/Odiy8Q= Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Wed, 24 Jun 2015 17:50:32 +0200 The fc_fcp_ddp_done() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Acked-by: Vasu Dev --- drivers/scsi/libfc/fc_exch.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c index 1b3a094..aad6f48 100644 --- a/drivers/scsi/libfc/fc_exch.c +++ b/drivers/scsi/libfc/fc_exch.c @@ -2120,8 +2120,7 @@ static struct fc_seq *fc_exch_seq_send(struct fc_lport *lport, spin_unlock_bh(&ep->ex_lock); return sp; err: - if (fsp) - fc_fcp_ddp_done(fsp); + fc_fcp_ddp_done(fsp); rc = fc_exch_done_locked(ep); spin_unlock_bh(&ep->ex_lock); if (!rc)