From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Love Subject: [PATCH 04/10] libfc: Remove extra pointer check Date: Fri, 07 May 2010 15:18:30 -0700 Message-ID: <20100507221829.14971.31836.stgit@localhost.localdomain> References: <20100507221804.14971.11739.stgit@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: Received: from mga11.intel.com ([192.55.52.93]:10734 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751170Ab0EGWSa (ORCPT ); Fri, 7 May 2010 18:18:30 -0400 In-Reply-To: <20100507221804.14971.11739.stgit@localhost.localdomain> Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: James.Bottomley@suse.de, linux-scsi@vger.kernel.org Cc: Robert Love The fcf pointer is checked again after this verification making the first check redundant. Remote the first check. Signed-off-by: Robert Love --- drivers/scsi/fcoe/libfcoe.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c index aadd249..ec4c88c 100644 --- a/drivers/scsi/fcoe/libfcoe.c +++ b/drivers/scsi/fcoe/libfcoe.c @@ -948,8 +948,7 @@ static void fcoe_ctlr_recv_clr_vlink(struct fcoe_ctlr *fip, u32 desc_mask; LIBFCOE_FIP_DBG(fip, "Clear Virtual Link received\n"); - if (!fcf) - return; + if (!fcf || !fc_host_port_id(lport->host)) return;