aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/i2c-dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/i2c-dev.c')
-rw-r--r--drivers/i2c/i2c-dev.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c
index 3f7b9af11137..2ea4585d18c5 100644
--- a/drivers/i2c/i2c-dev.c
+++ b/drivers/i2c/i2c-dev.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0-or-later
1/* 2/*
2 i2c-dev.c - i2c-bus driver, char device interface 3 i2c-dev.c - i2c-bus driver, char device interface
3 4
@@ -5,15 +6,6 @@
5 Copyright (C) 1998-99 Frodo Looijaard <frodol@dds.nl> 6 Copyright (C) 1998-99 Frodo Looijaard <frodol@dds.nl>
6 Copyright (C) 2003 Greg Kroah-Hartman <greg@kroah.com> 7 Copyright (C) 2003 Greg Kroah-Hartman <greg@kroah.com>
7 8
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17*/ 9*/
18 10
19/* Note that this is a complete rewrite of Simon Vogl's i2c-dev module. 11/* 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,
283 msgs[i].len < 1 || msgs[i].buf[0] < 1 || 275 msgs[i].len < 1 || msgs[i].buf[0] < 1 ||
284 msgs[i].len < msgs[i].buf[0] + 276 msgs[i].len < msgs[i].buf[0] +
285 I2C_SMBUS_BLOCK_MAX) { 277 I2C_SMBUS_BLOCK_MAX) {
278 i++;
286 res = -EINVAL; 279 res = -EINVAL;
287 break; 280 break;
288 } 281 }