From: Joe Perches Date: Wed, 11 Aug 2010 16:20:54 +0000 (+0200) Subject: i2c-dev: Remove unnecessary kmalloc casts X-Git-Tag: firefly_0821_release~9833^2~791^2~9 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=35a56c5b821c1a5ab904018f322a8e45afd116f0;p=firefly-linux-kernel-4.4.55.git i2c-dev: Remove unnecessary kmalloc casts Signed-off-by: Joe Perches Signed-off-by: Jean Delvare --- diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c index e0694e4d86c7..b3fcb59a5a10 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;