aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/cciss.c
diff options
context:
space:
mode:
authorJesper Juhl <jesper.juhl@gmail.com>2005-11-07 04:01:32 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 10:54:05 -0500
commit6044ec8882c726e325017bd948aa0cd94ad33abc (patch)
tree3bfc5dc93434e8ad556540f6689abcd2699aa45d /drivers/block/cciss.c
parent2ea7533060e361810c21b2f5ee02151c4dfb85d8 (diff)
[PATCH] kfree cleanup: misc remaining drivers
This is the remaining misc drivers/ part of the big kfree cleanup patch. Remove pointless checks for NULL prior to calling kfree() in misc files in drivers/. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Acked-by: Aristeu Sergio Rozanski Filho <aris@cathedrallabs.org> Acked-by: Roland Dreier <rolandd@cisco.com> Acked-by: Pierre Ossman <drzeus@drzeus.cx> Acked-by: Jean Delvare <khali@linux-fr.org> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Acked-by: Len Brown <len.brown@intel.com> Acked-by: "Antonino A. Daplas" <adaplas@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/block/cciss.c')
-rw-r--r--drivers/block/cciss.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 486b6e1c7dfb..a97c80b57737 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -1096,14 +1096,11 @@ static int cciss_ioctl(struct inode *inode, struct file *filep,
1096cleanup1: 1096cleanup1:
1097 if (buff) { 1097 if (buff) {
1098 for(i=0; i<sg_used; i++) 1098 for(i=0; i<sg_used; i++)
1099 if(buff[i] != NULL) 1099 kfree(buff[i]);
1100 kfree(buff[i]);
1101 kfree(buff); 1100 kfree(buff);
1102 } 1101 }
1103 if (buff_size) 1102 kfree(buff_size);
1104 kfree(buff_size); 1103 kfree(ioc);
1105 if (ioc)
1106 kfree(ioc);
1107 return(status); 1104 return(status);
1108 } 1105 }
1109 default: 1106 default:
@@ -3034,8 +3031,7 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
3034 return(1); 3031 return(1);
3035 3032
3036clean4: 3033clean4:
3037 if(hba[i]->cmd_pool_bits) 3034 kfree(hba[i]->cmd_pool_bits);
3038 kfree(hba[i]->cmd_pool_bits);
3039 if(hba[i]->cmd_pool) 3035 if(hba[i]->cmd_pool)
3040 pci_free_consistent(hba[i]->pdev, 3036 pci_free_consistent(hba[i]->pdev,
3041 NR_CMDS * sizeof(CommandList_struct), 3037 NR_CMDS * sizeof(CommandList_struct),