[lkml]   [2007]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 06/30] i2o: No need to cast kmalloc() return value in cfg_open()
In drivers/message/i2o/i2o_config.c::cfg_open() there's a completely
pointless cast of kmalloc()'s return value. This patch removes it.

Signed-off-by: Jesper Juhl <>
drivers/message/i2o/i2o_config.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/message/i2o/i2o_config.c b/drivers/message/i2o/i2o_config.c
index 84e046e..fb8c668 100644
--- a/drivers/message/i2o/i2o_config.c
+++ b/drivers/message/i2o/i2o_config.c
@@ -1053,10 +1053,9 @@ static int i2o_cfg_ioctl(struct inode *inode, struct file *fp, unsigned int cmd,

static int cfg_open(struct inode *inode, struct file *file)
- struct i2o_cfg_info *tmp =
- (struct i2o_cfg_info *)kmalloc(sizeof(struct i2o_cfg_info),
unsigned long flags;
+ struct i2o_cfg_info *tmp =
+ kmalloc(sizeof(struct i2o_cfg_info), GFP_KERNEL);

if (!tmp)
return -ENOMEM;
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-08-24 01:53    [W:0.218 / U:0.144 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site