diff options
Diffstat (limited to 'drivers/i2c/i2c-dev.c')
-rw-r--r-- | 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 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, | |||
219 | if (rdwr_arg.nmsgs > I2C_RDRW_IOCTL_MAX_MSGS) | 219 | if (rdwr_arg.nmsgs > I2C_RDRW_IOCTL_MAX_MSGS) |
220 | return -EINVAL; | 220 | return -EINVAL; |
221 | 221 | ||
222 | rdwr_pa = (struct i2c_msg *) | 222 | rdwr_pa = kmalloc(rdwr_arg.nmsgs * sizeof(struct i2c_msg), GFP_KERNEL); |
223 | kmalloc(rdwr_arg.nmsgs * sizeof(struct i2c_msg), | ||
224 | GFP_KERNEL); | ||
225 | if (!rdwr_pa) | 223 | if (!rdwr_pa) |
226 | return -ENOMEM; | 224 | return -ENOMEM; |
227 | 225 | ||