]> git.sur5r.net Git - groeck-nct6775/commitdiff
Fix maximum temperature source index
authorGuenter Roeck <linux@roeck-us.net>
Sat, 17 Mar 2012 17:46:30 +0000 (10:46 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Sat, 17 Mar 2012 17:46:30 +0000 (10:46 -0700)
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
nct6775.c

index 2e86b0fcba6dcc25b7936579138c669b766b9dbb..6754b877c61af87d0489f7899ba7a8789478d89d 100644 (file)
--- a/nct6775.c
+++ b/nct6775.c
@@ -1830,9 +1830,9 @@ store_pwm_temp_sel(struct device *dev, struct device_attribute *attr,
        int err;
        int reg;
        static const int max_src[] = {
-           ARRAY_SIZE(nct6775_temp_label),
-           ARRAY_SIZE(nct6776_temp_label),
-           ARRAY_SIZE(nct6779_temp_label)
+           ARRAY_SIZE(nct6775_temp_label) - 1,
+           ARRAY_SIZE(nct6776_temp_label) - 1,
+           ARRAY_SIZE(nct6779_temp_label) - 1
        };
 
        err = kstrtoul(buf, 10, &val);