diff options
author | Ingo Molnar <mingo@kernel.org> | 2019-06-03 11:56:35 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2019-06-03 11:56:35 +0200 |
commit | f7b6a8b30cedaa64ba18d80f1fb3404274281639 (patch) | |
tree | 13937ba94eed328bb19b1ccf343cca35446b878b /drivers/i2c/i2c-dev.c | |
parent | b33fb3cf6f5e039dea4a85a708a2c86f8a323575 (diff) | |
parent | f2c7c76c5d0a443053e94adb9f0918fa2fb85c3a (diff) |
Merge tag 'v5.2-rc3' into perf/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/i2c/i2c-dev.c')
-rw-r--r-- | drivers/i2c/i2c-dev.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c index 3f7b9af111379..2ea4585d18c5e 100644 --- a/drivers/i2c/i2c-dev.c +++ b/drivers/i2c/i2c-dev.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* i2c-dev.c - i2c-bus driver, char device interface @@ -5,15 +6,6 @@ Copyright (C) 1998-99 Frodo Looijaard <frodol@dds.nl> Copyright (C) 2003 Greg Kroah-Hartman <greg@kroah.com> - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. */ /* Note that this is a complete rewrite of Simon Vogl's i2c-dev module. @@ -283,6 +275,7 @@ static noinline int i2cdev_ioctl_rdwr(struct i2c_client *client, msgs[i].len < 1 || msgs[i].buf[0] < 1 || msgs[i].len < msgs[i].buf[0] + I2C_SMBUS_BLOCK_MAX) { + i++; res = -EINVAL; break; } |