Skip to content

Commit

Permalink
hwmon: (nct6775) Set weight source to zero correctly
Browse files Browse the repository at this point in the history
This is dead code because j can never be 1 at this point.  We had
intended to just test if the bit was clear.

Fixes: bbd8dec ("hwmon: (nct6775) Add support for weighted fan control")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
  • Loading branch information
Dan Carpenter authored and Guenter Roeck committed Sep 5, 2018
1 parent 5736184 commit e3f3d7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hwmon/nct6775.c
Original file line number Diff line number Diff line change
Expand Up @@ -1558,7 +1558,7 @@ static void nct6775_update_pwm(struct device *dev)
reg = nct6775_read_value(data, data->REG_WEIGHT_TEMP_SEL[i]);
data->pwm_weight_temp_sel[i] = reg & 0x1f;
/* If weight is disabled, report weight source as 0 */
if (j == 1 && !(reg & 0x80))
if (!(reg & 0x80))
data->pwm_weight_temp_sel[i] = 0;

/* Weight temp data */
Expand Down

0 comments on commit e3f3d7a

Please sign in to comment.