[SCSI] fusion-kfree-cleanup

This patch is originally From: Jesper Juhl <juhl-lkml@dif.dk>

This patch gets rid of redundant NULL checks prior to calling kfree() in
drivers/message/* There are also a few small whitespace changes in there.

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This commit is contained in:
Moore, Eric Dean
2005-05-11 17:37:26 -06:00
committed by James Bottomley
parent 3fadc59d60
commit d485eb8305
4 changed files with 27 additions and 39 deletions

View File

@@ -998,20 +998,17 @@ mptscsih_remove(struct pci_dev *pdev)
hd->ScsiLookup = NULL;
}
if (hd->Targets != NULL) {
/*
* Free pointer array.
*/
kfree(hd->Targets);
hd->Targets = NULL;
}
/*
* Free pointer array.
*/
kfree(hd->Targets);
hd->Targets = NULL;
dprintk((MYIOC_s_INFO_FMT
"Free'd ScsiLookup (%d) memory\n",
hd->ioc->name, sz1));
if (hd->info_kbuf != NULL)
kfree(hd->info_kbuf);
kfree(hd->info_kbuf);
/* NULL the Scsi_Host pointer
*/