diff options
author | Jesper Juhl <jesper.juhl@gmail.com> | 2005-11-07 04:01:26 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 10:54:01 -0500 |
commit | c9475cb0c358ff0dd473544280d92482df491913 (patch) | |
tree | 091617d0bdab9273d44139c86af21b7540e6d9b1 /drivers/scsi/lpfc/lpfc_init.c | |
parent | 089b1dbbde28f0f641c20beabba28fa89ab4fab9 (diff) |
[PATCH] kfree cleanup: drivers/scsi
This is the drivers/scsi/ part of the big kfree cleanup patch.
Remove pointless checks for NULL prior to calling kfree() in drivers/scsi/.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Acked-by: Kai Makisara <kai.makisara@kolumbus.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
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); |