[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>
This commit is contained in:
committed by
Linus Torvalds
parent
089b1dbbde
commit
c9475cb0c3
@ -248,8 +248,7 @@ lpfc_read_sparam(struct lpfc_hba * phba, LPFC_MBOXQ_t * pmb)
|
||||
|
||||
if (((mp = kmalloc(sizeof (struct lpfc_dmabuf), GFP_KERNEL)) == 0) ||
|
||||
((mp->virt = lpfc_mbuf_alloc(phba, 0, &(mp->phys))) == 0)) {
|
||||
if (mp)
|
||||
kfree(mp);
|
||||
kfree(mp);
|
||||
mb->mbxCommand = MBX_READ_SPARM64;
|
||||
/* READ_SPARAM: no buffers */
|
||||
lpfc_printf_log(phba,
|
||||
@ -363,9 +362,7 @@ lpfc_reg_login(struct lpfc_hba * phba,
|
||||
/* Get a buffer to hold NPorts Service Parameters */
|
||||
if (((mp = kmalloc(sizeof (struct lpfc_dmabuf), GFP_KERNEL)) == NULL) ||
|
||||
((mp->virt = lpfc_mbuf_alloc(phba, 0, &(mp->phys))) == 0)) {
|
||||
if (mp)
|
||||
kfree(mp);
|
||||
|
||||
kfree(mp);
|
||||
mb->mbxCommand = MBX_REG_LOGIN64;
|
||||
/* REG_LOGIN: no buffers */
|
||||
lpfc_printf_log(phba,
|
||||
|
Reference in New Issue
Block a user