diff options
author | Moore, Eric Dean <Eric.Moore@lsil.com> | 2005-05-11 19:37:26 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-05-20 16:47:54 -0400 |
commit | d485eb830576eef911727b1347402e9a708998a2 (patch) | |
tree | 497abb8f1cf8f82969647e0844da6752042f220a /drivers/message/fusion/mptscsih.c | |
parent | 3fadc59d603caf70e7a5295158e4f6eb06dffb8f (diff) |
[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.c | 15 |
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) | |||
998 | hd->ScsiLookup = NULL; | 998 | hd->ScsiLookup = NULL; |
999 | } | 999 | } |
1000 | 1000 | ||
1001 | if (hd->Targets != NULL) { | 1001 | /* |
1002 | /* | 1002 | * Free pointer array. |
1003 | * Free pointer array. | 1003 | */ |
1004 | */ | 1004 | kfree(hd->Targets); |
1005 | kfree(hd->Targets); | 1005 | hd->Targets = NULL; |
1006 | hd->Targets = NULL; | ||
1007 | } | ||
1008 | 1006 | ||
1009 | dprintk((MYIOC_s_INFO_FMT | 1007 | dprintk((MYIOC_s_INFO_FMT |
1010 | "Free'd ScsiLookup (%d) memory\n", | 1008 | "Free'd ScsiLookup (%d) memory\n", |
1011 | hd->ioc->name, sz1)); | 1009 | hd->ioc->name, sz1)); |
1012 | 1010 | ||
1013 | if (hd->info_kbuf != NULL) | 1011 | kfree(hd->info_kbuf); |
1014 | kfree(hd->info_kbuf); | ||
1015 | 1012 | ||
1016 | /* NULL the Scsi_Host pointer | 1013 | /* NULL the Scsi_Host pointer |
1017 | */ | 1014 | */ |