summaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion/mptbase.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/mptbase.c
parent3fadc59d603caf70e7a5295158e4f6eb06dffb8f (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/mptbase.c')
-rw-r--r--drivers/message/fusion/mptbase.c25
1 files changed, 8 insertions, 17 deletions
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index 673cdd955ee..8b623278ccd 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -1837,15 +1837,10 @@ mpt_adapter_disable(MPT_ADAPTER *ioc)
ioc->alloc_total -= sz;
}
- if (ioc->spi_data.nvram != NULL) {
- kfree(ioc->spi_data.nvram);
- ioc->spi_data.nvram = NULL;
- }
-
- if (ioc->spi_data.pIocPg3 != NULL) {
- kfree(ioc->spi_data.pIocPg3);
- ioc->spi_data.pIocPg3 = NULL;
- }
+ kfree(ioc->spi_data.nvram);
+ kfree(ioc->spi_data.pIocPg3);
+ ioc->spi_data.nvram = NULL;
+ ioc->spi_data.pIocPg3 = NULL;
if (ioc->spi_data.pIocPg4 != NULL) {
sz = ioc->spi_data.IocPg4Sz;
@@ -1862,10 +1857,8 @@ mpt_adapter_disable(MPT_ADAPTER *ioc)
ioc->ReqToChain = NULL;
}
- if (ioc->ChainToChain != NULL) {
- kfree(ioc->ChainToChain);
- ioc->ChainToChain = NULL;
- }
+ kfree(ioc->ChainToChain);
+ ioc->ChainToChain = NULL;
}
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
@@ -4403,10 +4396,8 @@ mpt_read_ioc_pg_3(MPT_ADAPTER *ioc)
/* Free the old page
*/
- if (ioc->spi_data.pIocPg3) {
- kfree(ioc->spi_data.pIocPg3);
- ioc->spi_data.pIocPg3 = NULL;
- }
+ kfree(ioc->spi_data.pIocPg3);
+ ioc->spi_data.pIocPg3 = NULL;
/* There is at least one physical disk.
* Read and save IOC Page 3