aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/megaraid
diff options
context:
space:
mode:
authorJesper Juhl <jesper.juhl@gmail.com>2005-11-07 04:01:26 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 10:54:01 -0500
commitc9475cb0c358ff0dd473544280d92482df491913 (patch)
tree091617d0bdab9273d44139c86af21b7540e6d9b1 /drivers/scsi/megaraid
parent089b1dbbde28f0f641c20beabba28fa89ab4fab9 (diff)
[PATCH] kfree cleanup: drivers/scsi
This is the drivers/scsi/ part of the big kfree cleanup patch. Remove pointless checks for NULL prior to calling kfree() in drivers/scsi/. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Acked-by: Kai Makisara <kai.makisara@kolumbus.fi> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/scsi/megaraid')
-rw-r--r--drivers/scsi/megaraid/megaraid_mbox.c5
-rw-r--r--drivers/scsi/megaraid/megaraid_mm.c11
2 files changed, 5 insertions, 11 deletions
diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c
index c9e743ba09ec..1a3d195a2d36 100644
--- a/drivers/scsi/megaraid/megaraid_mbox.c
+++ b/drivers/scsi/megaraid/megaraid_mbox.c
@@ -3937,9 +3937,8 @@ megaraid_sysfs_free_resources(adapter_t *adapter)
3937{ 3937{
3938 mraid_device_t *raid_dev = ADAP2RAIDDEV(adapter); 3938 mraid_device_t *raid_dev = ADAP2RAIDDEV(adapter);
3939 3939
3940 if (raid_dev->sysfs_uioc) kfree(raid_dev->sysfs_uioc); 3940 kfree(raid_dev->sysfs_uioc);
3941 3941 kfree(raid_dev->sysfs_mbox64);
3942 if (raid_dev->sysfs_mbox64) kfree(raid_dev->sysfs_mbox64);
3943 3942
3944 if (raid_dev->sysfs_buffer) { 3943 if (raid_dev->sysfs_buffer) {
3945 pci_free_consistent(adapter->pdev, PAGE_SIZE, 3944 pci_free_consistent(adapter->pdev, PAGE_SIZE,
diff --git a/drivers/scsi/megaraid/megaraid_mm.c b/drivers/scsi/megaraid/megaraid_mm.c
index 37d110e864c4..8f3ce0432295 100644
--- a/drivers/scsi/megaraid/megaraid_mm.c
+++ b/drivers/scsi/megaraid/megaraid_mm.c
@@ -995,17 +995,13 @@ pthru_dma_pool_error:
995 995
996memalloc_error: 996memalloc_error:
997 997
998 if (adapter->kioc_list) 998 kfree(adapter->kioc_list);
999 kfree(adapter->kioc_list); 999 kfree(adapter->mbox_list);
1000
1001 if (adapter->mbox_list)
1002 kfree(adapter->mbox_list);
1003 1000
1004 if (adapter->pthru_dma_pool) 1001 if (adapter->pthru_dma_pool)
1005 pci_pool_destroy(adapter->pthru_dma_pool); 1002 pci_pool_destroy(adapter->pthru_dma_pool);
1006 1003
1007 if (adapter) 1004 kfree(adapter);
1008 kfree(adapter);
1009 1005
1010 return rval; 1006 return rval;
1011} 1007}
@@ -1157,7 +1153,6 @@ mraid_mm_free_adp_resources(mraid_mmadp_t *adp)
1157 } 1153 }
1158 1154
1159 kfree(adp->kioc_list); 1155 kfree(adp->kioc_list);
1160
1161 kfree(adp->mbox_list); 1156 kfree(adp->mbox_list);
1162 1157
1163 pci_pool_destroy(adp->pthru_dma_pool); 1158 pci_pool_destroy(adp->pthru_dma_pool);