[PATCH 06/30] i2o: No need to cast kmalloc() return value in cfg_open()

From: Jesper Juhl
Date: Thu Aug 23 2007 - 19:51:40 EST


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 <jesper.juhl@xxxxxxxxx>
---
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),
- GFP_KERNEL);
unsigned long flags;
+ struct i2o_cfg_info *tmp =
+ kmalloc(sizeof(struct i2o_cfg_info), GFP_KERNEL);

if (!tmp)
return -ENOMEM;
--
1.5.2.2

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/