From 28a867963648ee705ce9cb0a77a64899278e6706 Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Sat, 17 Mar 2012 10:46:30 -0700 Subject: [PATCH] Fix maximum temperature source index Signed-off-by: Guenter Roeck --- nct6775.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nct6775.c b/nct6775.c index 2e86b0f..6754b87 100644 --- 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); -- 2.39.5