diff options
author | Jesper Juhl <jesper.juhl@gmail.com> | 2005-11-07 04:01:26 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 10:54:01 -0500 |
commit | c9475cb0c358ff0dd473544280d92482df491913 (patch) | |
tree | 091617d0bdab9273d44139c86af21b7540e6d9b1 /drivers/scsi/megaraid/megaraid_mm.c | |
parent | 089b1dbbde28f0f641c20beabba28fa89ab4fab9 (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/megaraid_mm.c')
-rw-r--r-- | drivers/scsi/megaraid/megaraid_mm.c | 11 |
1 files changed, 3 insertions, 8 deletions
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 | ||
996 | memalloc_error: | 996 | memalloc_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); |