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/mptbase.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/mptbase.c')
-rw-r--r-- | drivers/message/fusion/mptbase.c | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c index 673cdd955eed..8b623278ccd2 100644 --- a/drivers/message/fusion/mptbase.c +++ b/drivers/message/fusion/mptbase.c | |||
@@ -1837,15 +1837,10 @@ mpt_adapter_disable(MPT_ADAPTER *ioc) | |||
1837 | ioc->alloc_total -= sz; | 1837 | ioc->alloc_total -= sz; |
1838 | } | 1838 | } |
1839 | 1839 | ||
1840 | if (ioc->spi_data.nvram != NULL) { | 1840 | kfree(ioc->spi_data.nvram); |
1841 | kfree(ioc->spi_data.nvram); | 1841 | kfree(ioc->spi_data.pIocPg3); |
1842 | ioc->spi_data.nvram = NULL; | 1842 | ioc->spi_data.nvram = NULL; |
1843 | } | 1843 | ioc->spi_data.pIocPg3 = NULL; |
1844 | |||
1845 | if (ioc->spi_data.pIocPg3 != NULL) { | ||
1846 | kfree(ioc->spi_data.pIocPg3); | ||
1847 | ioc->spi_data.pIocPg3 = NULL; | ||
1848 | } | ||
1849 | 1844 | ||
1850 | if (ioc->spi_data.pIocPg4 != NULL) { | 1845 | if (ioc->spi_data.pIocPg4 != NULL) { |
1851 | sz = ioc->spi_data.IocPg4Sz; | 1846 | sz = ioc->spi_data.IocPg4Sz; |
@@ -1862,10 +1857,8 @@ mpt_adapter_disable(MPT_ADAPTER *ioc) | |||
1862 | ioc->ReqToChain = NULL; | 1857 | ioc->ReqToChain = NULL; |
1863 | } | 1858 | } |
1864 | 1859 | ||
1865 | if (ioc->ChainToChain != NULL) { | 1860 | kfree(ioc->ChainToChain); |
1866 | kfree(ioc->ChainToChain); | 1861 | ioc->ChainToChain = NULL; |
1867 | ioc->ChainToChain = NULL; | ||
1868 | } | ||
1869 | } | 1862 | } |
1870 | 1863 | ||
1871 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ | 1864 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ |
@@ -4403,10 +4396,8 @@ mpt_read_ioc_pg_3(MPT_ADAPTER *ioc) | |||
4403 | 4396 | ||
4404 | /* Free the old page | 4397 | /* Free the old page |
4405 | */ | 4398 | */ |
4406 | if (ioc->spi_data.pIocPg3) { | 4399 | kfree(ioc->spi_data.pIocPg3); |
4407 | kfree(ioc->spi_data.pIocPg3); | 4400 | ioc->spi_data.pIocPg3 = NULL; |
4408 | ioc->spi_data.pIocPg3 = NULL; | ||
4409 | } | ||
4410 | 4401 | ||
4411 | /* There is at least one physical disk. | 4402 | /* There is at least one physical disk. |
4412 | * Read and save IOC Page 3 | 4403 | * Read and save IOC Page 3 |