diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_els.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_els.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index 08a0c00cfc30..bcc29ec126dc 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c | |||
@@ -127,8 +127,7 @@ lpfc_prep_els_iocb(struct lpfc_hba * phba, | |||
127 | if (((pcmd = kmalloc(sizeof (struct lpfc_dmabuf), GFP_KERNEL)) == 0) || | 127 | if (((pcmd = kmalloc(sizeof (struct lpfc_dmabuf), GFP_KERNEL)) == 0) || |
128 | ((pcmd->virt = lpfc_mbuf_alloc(phba, | 128 | ((pcmd->virt = lpfc_mbuf_alloc(phba, |
129 | MEM_PRI, &(pcmd->phys))) == 0)) { | 129 | MEM_PRI, &(pcmd->phys))) == 0)) { |
130 | if (pcmd) | 130 | kfree(pcmd); |
131 | kfree(pcmd); | ||
132 | 131 | ||
133 | spin_lock_irq(phba->host->host_lock); | 132 | spin_lock_irq(phba->host->host_lock); |
134 | lpfc_sli_release_iocbq(phba, elsiocb); | 133 | lpfc_sli_release_iocbq(phba, elsiocb); |
@@ -145,8 +144,7 @@ lpfc_prep_els_iocb(struct lpfc_hba * phba, | |||
145 | prsp->virt = lpfc_mbuf_alloc(phba, MEM_PRI, | 144 | prsp->virt = lpfc_mbuf_alloc(phba, MEM_PRI, |
146 | &prsp->phys); | 145 | &prsp->phys); |
147 | if (prsp == 0 || prsp->virt == 0) { | 146 | if (prsp == 0 || prsp->virt == 0) { |
148 | if (prsp) | 147 | kfree(prsp); |
149 | kfree(prsp); | ||
150 | lpfc_mbuf_free(phba, pcmd->virt, pcmd->phys); | 148 | lpfc_mbuf_free(phba, pcmd->virt, pcmd->phys); |
151 | kfree(pcmd); | 149 | kfree(pcmd); |
152 | spin_lock_irq(phba->host->host_lock); | 150 | spin_lock_irq(phba->host->host_lock); |
@@ -172,8 +170,7 @@ lpfc_prep_els_iocb(struct lpfc_hba * phba, | |||
172 | lpfc_mbuf_free(phba, prsp->virt, prsp->phys); | 170 | lpfc_mbuf_free(phba, prsp->virt, prsp->phys); |
173 | kfree(pcmd); | 171 | kfree(pcmd); |
174 | kfree(prsp); | 172 | kfree(prsp); |
175 | if (pbuflist) | 173 | kfree(pbuflist); |
176 | kfree(pbuflist); | ||
177 | return NULL; | 174 | return NULL; |
178 | } | 175 | } |
179 | 176 | ||