Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp325597pxb; Wed, 18 Nov 2020 05:40:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJzRQRc0TvI9GwAhwBajxZFcahDIuXh6PTpgqGPXgTJCXo6qLbmf+TbTfrEGId3SyuXVkMeC X-Received: by 2002:a17:907:20cd:: with SMTP id qq13mr2061081ejb.141.1605706851371; Wed, 18 Nov 2020 05:40:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605706851; cv=none; d=google.com; s=arc-20160816; b=OcWbnZkC1kDpZMlB7KK66jPUF4tYT/rkpGCgFFw5VB0uMkqHAkHVlIilkVbJIW7XhX d3+KzhOCvd2rv9hS0y6reogDWpCBQFiJJpsw7k/P7dSoZdYA+V2jjgGQtG4EaOSMw1zi BMoTMxxvILH3D+hyYulCkL/r+iyHJEcXUFRIGoGFrywwwYlplGnKOVlcmZDoVxAH9YaU pWWci7puYs5HMsc9m9N1oLhIhKl83De30IOAKy54mTHXabDcDv1JL5KSBjLgSNRKtBSJ nOlKG5rZXlkJDXZB1Yvs/85nSJ27N27+/WWbwDA68V4F8Rm6fQ9K3epB9X+ZAOe3kYTH y1GA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=2JPrHgO30aO9pCVvwOhPTKCGP4X7x3zwFe7HkEtXZY8=; b=qwca1r2pOYa1VZWsBgsk5Xs9jHaVw3w6FRcM/38hrBN9bch2ErTw0Fhz4DFm4YHHZJ N7egFJwPcAchJaqYZX6V+/zvlvY070UhIf10SkPv+gkmdzwhn0GArhoELVlDJ+a0WuWN XGPTy9EjyDEFBKJGvie6OcI4v3XT9mFqxSFCYypUylLE0YdICJoKPwAmQSYEWbmfi+Io zCsxvR7jXsCn2XrWBIfBnDptqT4/Oqn/FIaczkzbhPTpo/biwcm7v6R4zEmPwPxZ129w 3e/uo0G/21BOcgKvuGZyQ7TsyU/Ww3kpm5BZs3tC2QHG20OGj5VxiProjSjwQojIxvHU Xulg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mj1si3421532ejb.54.2020.11.18.05.40.25; Wed, 18 Nov 2020 05:40:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726433AbgKRNhu (ORCPT + 99 others); Wed, 18 Nov 2020 08:37:50 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:58688 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725822AbgKRNht (ORCPT ); Wed, 18 Nov 2020 08:37:49 -0500 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kfNea-0002zN-EB; Wed, 18 Nov 2020 13:37:44 +0000 From: Colin King To: James Smart , Dick Kennedy , "James E . J . Bottomley" , "Martin K . Petersen" , linux-scsi@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH][next] scsi: lpfc: remove dead code on second !ndlp check Date: Wed, 18 Nov 2020 13:37:44 +0000 Message-Id: <20201118133744.461385-1-colin.king@canonical.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King Currently there is a null check on the pointer ndlp that exits via error path issue_ct_rsp_exit followed by another null check on the same pointer that is almost identical to the previous null check stanza and yet can never can be reached because the previous check exited via issue_ct_rsp_exit. This is deadcode and can be removed. Addresses-Coverity: ("Logically dead code") Signed-off-by: Colin Ian King --- drivers/scsi/lpfc/lpfc_bsg.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c index 35f4998504c1..41e3657c2d8d 100644 --- a/drivers/scsi/lpfc/lpfc_bsg.c +++ b/drivers/scsi/lpfc/lpfc_bsg.c @@ -1526,12 +1526,6 @@ lpfc_issue_ct_rsp(struct lpfc_hba *phba, struct bsg_job *job, uint32_t tag, goto issue_ct_rsp_exit; } - /* Check if the ndlp is active */ - if (!ndlp) { - rc = IOCB_ERROR; - goto issue_ct_rsp_exit; - } - /* get a refernece count so the ndlp doesn't go away while * we respond */ -- 2.28.0