lkml.org 
[lkml]   [2010]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 06/21] drivers/i2c/i2c-dev.c: Remove unnecessary kmalloc casts
    Date
    Signed-off-by: Joe Perches <joe@perches.com>
    ---
    drivers/i2c/i2c-dev.c | 4 +---
    1 files changed, 1 insertions(+), 3 deletions(-)

    diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c
    index e0694e4..b3fcb59 100644
    --- a/drivers/i2c/i2c-dev.c
    +++ b/drivers/i2c/i2c-dev.c
    @@ -219,9 +219,7 @@ static noinline int i2cdev_ioctl_rdrw(struct i2c_client *client,
    if (rdwr_arg.nmsgs > I2C_RDRW_IOCTL_MAX_MSGS)
    return -EINVAL;

    - rdwr_pa = (struct i2c_msg *)
    - kmalloc(rdwr_arg.nmsgs * sizeof(struct i2c_msg),
    - GFP_KERNEL);
    + rdwr_pa = kmalloc(rdwr_arg.nmsgs * sizeof(struct i2c_msg), GFP_KERNEL);
    if (!rdwr_pa)
    return -ENOMEM;

    --
    1.7.0.3.311.g6a6955


    \
     
     \ /
      Last update: 2010-06-01 05:29    [W:0.019 / U:0.732 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site