diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_init.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 6 |
1 files changed, 2 insertions, 4 deletions
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); |