Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > fc11cd6e1c513a17304da94a5390f3cd > files > 3464

kernel-2.6.18-194.11.1.el5.src.rpm

From: Rob Evers <revers@redhat.com>
Date: Fri, 10 Jul 2009 14:17:26 -0400
Subject: [scsi] lpfc: move pointer ref. inside alloc check in
Message-id: 20090710181256.4580.58469.sendpatchset@localhost.localdomain
O-Subject: [RHEL5.4 PATCH 2/3 v3] lpfc: move pointer ref. inside alloc check in [1/3].
Bugzilla: 509010

https://bugzilla.redhat.com/show_bug.cgi?id=509010

diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 0862365..55e53d4 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -11035,10 +11035,10 @@ lpfc_prep_seq(struct lpfc_vport *vport, struct hbq_dmabuf *seq_dmabuf)
 	       fc_hdr->fh_s_id[2]);
 	/* Get an iocbq struct to fill in. */
 	first_iocbq = lpfc_sli_get_iocbq(vport->phba);
-	first_iocbq->vport = vport;
-	first_iocbq->iocb.unsli3.rcvsli3.acc_len = 0;
 	if (first_iocbq) {
 		/* Initialize the first IOCB. */
+		first_iocbq->vport = vport;
+		first_iocbq->iocb.unsli3.rcvsli3.acc_len = 0;
 		first_iocbq->iocb.ulpStatus = IOSTAT_SUCCESS;
 		first_iocbq->iocb.ulpCommand = CMD_IOCB_RCV_SEQ64_CX;
 		first_iocbq->iocb.ulpContext = be16_to_cpu(fc_hdr->fh_ox_id);