diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2019-02-08 09:40:29 +0530 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2019-02-08 09:40:29 +0530 |
commit | af816ddfbdf049dfce251513af4b5dc903c9764c (patch) | |
tree | 15fe94fb3dbb0db54d203c2a1229a0b7a9c3a608 /drivers/i2c/i2c-dev.c | |
parent | 446fae2bb5395f3028d8e3aae1508737e5a72ea1 (diff) | |
parent | dab535052f67db0ff48b1b23e714b58650d1a787 (diff) |
Merge branch 'cpufreq/qcom-hw' into cpufreq/arm/linux-next
Diffstat (limited to 'drivers/i2c/i2c-dev.c')
-rw-r--r-- | drivers/i2c/i2c-dev.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c index 1aca742fde4a..ccd76c71af09 100644 --- a/drivers/i2c/i2c-dev.c +++ b/drivers/i2c/i2c-dev.c @@ -470,9 +470,15 @@ static long i2cdev_ioctl(struct file *file, unsigned int cmd, unsigned long arg) data_arg.data); } case I2C_RETRIES: + if (arg > INT_MAX) + return -EINVAL; + client->adapter->retries = arg; break; case I2C_TIMEOUT: + if (arg > INT_MAX) + return -EINVAL; + /* For historical reasons, user-space sets the timeout * value in units of 10 ms. */ |