aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/i2o/i2o_config.c
diff options
context:
space:
mode:
authorMarkus Lidel <Markus.Lidel@shadowconnect.com>2006-01-06 03:19:33 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-06 11:33:54 -0500
commitf6ed39a6e1a88240eec629a3da17c3a47ada3b89 (patch)
treeb19fee742b48865b94bb26ed4428ca00a1a95b2c /drivers/message/i2o/i2o_config.c
parent2e1973a3cd0b9fe31469be62df3583bdc5a34f51 (diff)
[PATCH] I2O: Optimizing
- make i2o_iop_free() static inline (from Adrian Bunk) - changed kmalloc() + memset(0) into kzalloc() Signed-off-by: Markus Lidel <Markus.Lidel@shadowconnect.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/message/i2o/i2o_config.c')
-rw-r--r--drivers/message/i2o/i2o_config.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/message/i2o/i2o_config.c b/drivers/message/i2o/i2o_config.c
index 286fef3240c4..89daf67b764d 100644
--- a/drivers/message/i2o/i2o_config.c
+++ b/drivers/message/i2o/i2o_config.c
@@ -583,13 +583,12 @@ static int i2o_cfg_passthru32(struct file *file, unsigned cmnd,
583 reply_size >>= 16; 583 reply_size >>= 16;
584 reply_size <<= 2; 584 reply_size <<= 2;
585 585
586 reply = kmalloc(reply_size, GFP_KERNEL); 586 reply = kzalloc(reply_size, GFP_KERNEL);
587 if (!reply) { 587 if (!reply) {
588 printk(KERN_WARNING "%s: Could not allocate reply buffer\n", 588 printk(KERN_WARNING "%s: Could not allocate reply buffer\n",
589 c->name); 589 c->name);
590 return -ENOMEM; 590 return -ENOMEM;
591 } 591 }
592 memset(reply, 0, reply_size);
593 592
594 sg_offset = (msg->u.head[0] >> 4) & 0x0f; 593 sg_offset = (msg->u.head[0] >> 4) & 0x0f;
595 594
@@ -817,13 +816,12 @@ static int i2o_cfg_passthru(unsigned long arg)
817 reply_size >>= 16; 816 reply_size >>= 16;
818 reply_size <<= 2; 817 reply_size <<= 2;
819 818
820 reply = kmalloc(reply_size, GFP_KERNEL); 819 reply = kzalloc(reply_size, GFP_KERNEL);
821 if (!reply) { 820 if (!reply) {
822 printk(KERN_WARNING "%s: Could not allocate reply buffer\n", 821 printk(KERN_WARNING "%s: Could not allocate reply buffer\n",
823 c->name); 822 c->name);
824 return -ENOMEM; 823 return -ENOMEM;
825 } 824 }
826 memset(reply, 0, reply_size);
827 825
828 sg_offset = (msg->u.head[0] >> 4) & 0x0f; 826 sg_offset = (msg->u.head[0] >> 4) & 0x0f;
829 827