]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/i2c/i2c-dev.c
net/mlx5e: ethtool, Fix analysis of speed setting
[linux.git] / drivers / i2c / i2c-dev.c
index 3f7b9af111379a9d54d0315be121b52e919de9a9..2ea4585d18c5e1e05c98a8d25439037eb843b303 100644 (file)
@@ -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;
                        }