From: Guenter Roeck Date: Sat, 17 Mar 2012 17:46:30 +0000 (-0700) Subject: Fix maximum temperature source index X-Git-Tag: nct6775-v0.9~43 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=28a867963648ee705ce9cb0a77a64899278e6706;p=groeck-nct6775 Fix maximum temperature source index Signed-off-by: Guenter Roeck --- 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);