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_els.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_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 | ||