diff options
Diffstat (limited to 'drivers/scsi/lpfc')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_els.c | 9 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 6 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_mbox.c | 7 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_sli.c | 7 |
4 files changed, 9 insertions, 20 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 | ||
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 4e04470321a2..c90723860a04 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c | |||
@@ -894,8 +894,7 @@ lpfc_post_buffer(struct lpfc_hba * phba, struct lpfc_sli_ring * pring, int cnt, | |||
894 | mp1->virt = lpfc_mbuf_alloc(phba, MEM_PRI, | 894 | mp1->virt = lpfc_mbuf_alloc(phba, MEM_PRI, |
895 | &mp1->phys); | 895 | &mp1->phys); |
896 | if (mp1 == 0 || mp1->virt == 0) { | 896 | if (mp1 == 0 || mp1->virt == 0) { |
897 | if (mp1) | 897 | kfree(mp1); |
898 | kfree(mp1); | ||
899 | spin_lock_irq(phba->host->host_lock); | 898 | spin_lock_irq(phba->host->host_lock); |
900 | lpfc_sli_release_iocbq(phba, iocb); | 899 | lpfc_sli_release_iocbq(phba, iocb); |
901 | spin_unlock_irq(phba->host->host_lock); | 900 | spin_unlock_irq(phba->host->host_lock); |
@@ -911,8 +910,7 @@ lpfc_post_buffer(struct lpfc_hba * phba, struct lpfc_sli_ring * pring, int cnt, | |||
911 | mp2->virt = lpfc_mbuf_alloc(phba, MEM_PRI, | 910 | mp2->virt = lpfc_mbuf_alloc(phba, MEM_PRI, |
912 | &mp2->phys); | 911 | &mp2->phys); |
913 | if (mp2 == 0 || mp2->virt == 0) { | 912 | if (mp2 == 0 || mp2->virt == 0) { |
914 | if (mp2) | 913 | kfree(mp2); |
915 | kfree(mp2); | ||
916 | lpfc_mbuf_free(phba, mp1->virt, mp1->phys); | 914 | lpfc_mbuf_free(phba, mp1->virt, mp1->phys); |
917 | kfree(mp1); | 915 | kfree(mp1); |
918 | spin_lock_irq(phba->host->host_lock); | 916 | spin_lock_irq(phba->host->host_lock); |
diff --git a/drivers/scsi/lpfc/lpfc_mbox.c b/drivers/scsi/lpfc/lpfc_mbox.c index 31c20cc00609..e3bc8d3f7302 100644 --- a/drivers/scsi/lpfc/lpfc_mbox.c +++ b/drivers/scsi/lpfc/lpfc_mbox.c | |||
@@ -248,8 +248,7 @@ lpfc_read_sparam(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb) | |||
248 | 248 | ||
249 | if (((mp = kmalloc(sizeof (struct lpfc_dmabuf), GFP_KERNEL)) == 0) || | 249 | if (((mp = kmalloc(sizeof (struct lpfc_dmabuf), GFP_KERNEL)) == 0) || |
250 | ((mp->virt = lpfc_mbuf_alloc(phba, 0, &(mp->phys))) == 0)) { | 250 | ((mp->virt = lpfc_mbuf_alloc(phba, 0, &(mp->phys))) == 0)) { |
251 | if (mp) | 251 | kfree(mp); |
252 | kfree(mp); | ||
253 | mb->mbxCommand = MBX_READ_SPARM64; | 252 | mb->mbxCommand = MBX_READ_SPARM64; |
254 | /* READ_SPARAM: no buffers */ | 253 | /* READ_SPARAM: no buffers */ |
255 | lpfc_printf_log(phba, | 254 | lpfc_printf_log(phba, |
@@ -363,9 +362,7 @@ lpfc_reg_login(struct lpfc_hba * phba, | |||
363 | /* Get a buffer to hold NPorts Service Parameters */ | 362 | /* Get a buffer to hold NPorts Service Parameters */ |
364 | if (((mp = kmalloc(sizeof (struct lpfc_dmabuf), GFP_KERNEL)) == NULL) || | 363 | if (((mp = kmalloc(sizeof (struct lpfc_dmabuf), GFP_KERNEL)) == NULL) || |
365 | ((mp->virt = lpfc_mbuf_alloc(phba, 0, &(mp->phys))) == 0)) { | 364 | ((mp->virt = lpfc_mbuf_alloc(phba, 0, &(mp->phys))) == 0)) { |
366 | if (mp) | 365 | kfree(mp); |
367 | kfree(mp); | ||
368 | |||
369 | mb->mbxCommand = MBX_REG_LOGIN64; | 366 | mb->mbxCommand = MBX_REG_LOGIN64; |
370 | /* REG_LOGIN: no buffers */ | 367 | /* REG_LOGIN: no buffers */ |
371 | lpfc_printf_log(phba, | 368 | lpfc_printf_log(phba, |
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index 508710001ed6..e2c08c5d83fb 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c | |||
@@ -2269,11 +2269,8 @@ lpfc_sli_hba_down(struct lpfc_hba * phba) | |||
2269 | 2269 | ||
2270 | INIT_LIST_HEAD(&(pring->txq)); | 2270 | INIT_LIST_HEAD(&(pring->txq)); |
2271 | 2271 | ||
2272 | if (pring->fast_lookup) { | 2272 | kfree(pring->fast_lookup); |
2273 | kfree(pring->fast_lookup); | 2273 | pring->fast_lookup = NULL; |
2274 | pring->fast_lookup = NULL; | ||
2275 | } | ||
2276 | |||
2277 | } | 2274 | } |
2278 | 2275 | ||
2279 | spin_unlock_irqrestore(phba->host->host_lock, flags); | 2276 | spin_unlock_irqrestore(phba->host->host_lock, flags); |