X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=drivers%2Fhwmon%2Fdme1737.c;h=2c2cb1ec94c5f1a22ea47a6607c8408a4fe588c7;hb=6d7f18f6ea3a13af95bdf507fc54d42b165e1712;hp=9814d51b3af42893b607a5106b2e4030b3b87ecf;hpb=714af0693863dfb6f075f4465053976d2d076a21;p=linux-block.git diff --git a/drivers/hwmon/dme1737.c b/drivers/hwmon/dme1737.c index 9814d51b3af4..2c2cb1ec94c5 100644 --- a/drivers/hwmon/dme1737.c +++ b/drivers/hwmon/dme1737.c @@ -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]);