summaryrefslogtreecommitdiff
path: root/drivers/scsi/dpt_i2o.c
diff options
context:
space:
mode:
authorJesper Juhl <jesper.juhl@gmail.com>2005-11-07 01:01:26 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 07:54:01 -0800
commitc9475cb0c358ff0dd473544280d92482df491913 (patch)
tree091617d0bdab9273d44139c86af21b7540e6d9b1 /drivers/scsi/dpt_i2o.c
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/dpt_i2o.c')
-rw-r--r--drivers/scsi/dpt_i2o.c27
1 files changed, 8 insertions, 19 deletions
diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c
index 46d5571ec55a..c28e3aea1c3c 100644
--- a/drivers/scsi/dpt_i2o.c
+++ b/drivers/scsi/dpt_i2o.c
@@ -1037,18 +1037,10 @@ static void adpt_i2o_delete_hba(adpt_hba* pHba)
if(pHba->msg_addr_virt != pHba->base_addr_virt){
iounmap(pHba->msg_addr_virt);
}
- if(pHba->hrt) {
- kfree(pHba->hrt);
- }
- if(pHba->lct){
- kfree(pHba->lct);
- }
- if(pHba->status_block) {
- kfree(pHba->status_block);
- }
- if(pHba->reply_pool){
- kfree(pHba->reply_pool);
- }
+ kfree(pHba->hrt);
+ kfree(pHba->lct);
+ kfree(pHba->status_block);
+ kfree(pHba->reply_pool);
for(d = pHba->devices; d ; d = next){
next = d->next;
@@ -2706,14 +2698,12 @@ static s32 adpt_i2o_init_outbound_q(adpt_hba* pHba)
// If the command was successful, fill the fifo with our reply
// message packets
if(*status != 0x04 /*I2O_EXEC_OUTBOUND_INIT_COMPLETE*/) {
- kfree((void*)status);
+ kfree(status);
return -2;
}
- kfree((void*)status);
+ kfree(status);
- if(pHba->reply_pool != NULL){
- kfree(pHba->reply_pool);
- }
+ kfree(pHba->reply_pool);
pHba->reply_pool = (u32*)kmalloc(pHba->reply_fifo_size * REPLY_FRAME_SIZE * 4, GFP_KERNEL|ADDR32);
if(!pHba->reply_pool){
@@ -2929,8 +2919,7 @@ static int adpt_i2o_build_sys_table(void)
sys_tbl_len = sizeof(struct i2o_sys_tbl) + // Header + IOPs
(hba_count) * sizeof(struct i2o_sys_tbl_entry);
- if(sys_tbl)
- kfree(sys_tbl);
+ kfree(sys_tbl);
sys_tbl = kmalloc(sys_tbl_len, GFP_KERNEL|ADDR32);
if(!sys_tbl) {