dme1737: Keep index within pwm_config[]
[pandora-kernel.git] / drivers / hwmon / dme1737.c
index 9814d51..2c2cb1e 100644 (file)
@@ -1134,7 +1134,7 @@ static ssize_t show_pwm(struct device *dev, struct device_attribute *attr,
                res = PWM_FREQ_FROM_REG(data->pwm_freq[ix]);
                break;
        case SYS_PWM_ENABLE:
-               if (ix > 3) {
+               if (ix >= 3) {
                        res = 1; /* pwm[5-6] hard-wired to manual mode */
                } else {
                        res = PWM_EN_FROM_REG(data->pwm_config[ix]);