diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_vport.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_vport.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/scsi/lpfc/lpfc_vport.c b/drivers/scsi/lpfc/lpfc_vport.c index dc86e873102a..ffd575c379f3 100644 --- a/drivers/scsi/lpfc/lpfc_vport.c +++ b/drivers/scsi/lpfc/lpfc_vport.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
27 | #include <linux/kthread.h> | 27 | #include <linux/kthread.h> |
28 | #include <linux/pci.h> | 28 | #include <linux/pci.h> |
29 | #include <linux/slab.h> | ||
29 | #include <linux/spinlock.h> | 30 | #include <linux/spinlock.h> |
30 | 31 | ||
31 | #include <scsi/scsi.h> | 32 | #include <scsi/scsi.h> |
@@ -123,7 +124,12 @@ lpfc_vport_sparm(struct lpfc_hba *phba, struct lpfc_vport *vport) | |||
123 | } | 124 | } |
124 | mb = &pmb->u.mb; | 125 | mb = &pmb->u.mb; |
125 | 126 | ||
126 | lpfc_read_sparam(phba, pmb, vport->vpi); | 127 | rc = lpfc_read_sparam(phba, pmb, vport->vpi); |
128 | if (rc) { | ||
129 | mempool_free(pmb, phba->mbox_mem_pool); | ||
130 | return -ENOMEM; | ||
131 | } | ||
132 | |||
127 | /* | 133 | /* |
128 | * Grab buffer pointer and clear context1 so we can use | 134 | * Grab buffer pointer and clear context1 so we can use |
129 | * lpfc_sli_issue_box_wait | 135 | * lpfc_sli_issue_box_wait |