Message ID | 9b43145c-7666-c4bb-37de-7d1a9ebea72a@users.sourceforge.net |
---|---|
State | New |
Headers | show |
diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c index 6d8226d..a6e35ce 100644 --- a/drivers/i2c/i2c-dev.c +++ b/drivers/i2c/i2c-dev.c @@ -256,7 +256,7 @@ static noinline int i2cdev_ioctl_rdwr(struct i2c_client *client, return -EINVAL; rdwr_pa = memdup_user(rdwr_arg.msgs, - rdwr_arg.nmsgs * sizeof(struct i2c_msg)); + rdwr_arg.nmsgs * sizeof(*rdwr_pa)); if (IS_ERR(rdwr_pa)) return PTR_ERR(rdwr_pa);