diff options
author | Jean Delvare <khali@linux-fr.org> | 2010-03-05 16:17:26 -0500 |
---|---|---|
committer | Jean Delvare <khali@linux-fr.org> | 2010-03-05 16:17:26 -0500 |
commit | dc71afe5ac7e8d049bb991330518e4c898a7d92e (patch) | |
tree | d4062a740a4a287a933483a74c3393ddea67821d /drivers/hwmon/tmp421.c | |
parent | a44908d742a577fb5ccb9a8c082326d4cea234c2 (diff) |
hwmon: Fix off-by-one kind values
Recent changes on the I2C front have left off-by-one array indexes in
3 hwmon drivers. Fix them.
Faulty commit:
e5e9f44c2 i2c: Drop I2C_CLIENT_INSMOD_2 to 8
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Andre Prendel <andre.prendel@gmx.de>
Cc: stable@kernel.org
Diffstat (limited to 'drivers/hwmon/tmp421.c')
-rw-r--r-- | drivers/hwmon/tmp421.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwmon/tmp421.c b/drivers/hwmon/tmp421.c index bb9760d7e8b6..738c472ece27 100644 --- a/drivers/hwmon/tmp421.c +++ b/drivers/hwmon/tmp421.c | |||
@@ -254,9 +254,9 @@ static int tmp421_detect(struct i2c_client *client, | |||
254 | return -ENODEV; | 254 | return -ENODEV; |
255 | } | 255 | } |
256 | 256 | ||
257 | strlcpy(info->type, tmp421_id[kind - 1].name, I2C_NAME_SIZE); | 257 | strlcpy(info->type, tmp421_id[kind].name, I2C_NAME_SIZE); |
258 | dev_info(&adapter->dev, "Detected TI %s chip at 0x%02x\n", | 258 | dev_info(&adapter->dev, "Detected TI %s chip at 0x%02x\n", |
259 | names[kind - 1], client->addr); | 259 | names[kind], client->addr); |
260 | 260 | ||
261 | return 0; | 261 | return 0; |
262 | } | 262 | } |