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_mbox.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_mbox.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_mbox.c | 7 |
1 files changed, 2 insertions, 5 deletions
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, |