Skip to content

Commit

Permalink
i2c-dev: Remove unnecessary kmalloc casts
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
  • Loading branch information
Joe Perches authored and Jean Delvare committed Aug 11, 2010
1 parent 3d30701 commit 35a56c5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/i2c/i2c-dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 35a56c5

Please sign in to comment.