lkml.org 
[lkml]   [2007]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Date
    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 <jesper.juhl@gmail.com>
    ---
    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@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-08-24 01:53    [W:0.020 / U:0.276 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site