summaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion/mptscsih.c
diff options
context:
space:
mode:
authorMoore, Eric Dean <Eric.Moore@lsil.com>2005-05-11 17:37:26 -0600
committerJames Bottomley <jejb@mulgrave.(none)>2005-05-20 15:47:54 -0500
commitd485eb830576eef911727b1347402e9a708998a2 (patch)
tree497abb8f1cf8f82969647e0844da6752042f220a /drivers/message/fusion/mptscsih.c
parent3fadc59d603caf70e7a5295158e4f6eb06dffb8f (diff)
downloadblackbird-op-linux-d485eb830576eef911727b1347402e9a708998a2.tar.gz
blackbird-op-linux-d485eb830576eef911727b1347402e9a708998a2.zip
[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>
Diffstat (limited to 'drivers/message/fusion/mptscsih.c')
-rw-r--r--drivers/message/fusion/mptscsih.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c
index cf058a399dab..c8492034cfe7 100644
--- a/drivers/message/fusion/mptscsih.c
+++ b/drivers/message/fusion/mptscsih.c
@@ -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
*/
OpenPOWER on IntegriCloud