Skip to content

Commit

Permalink
hwmon: (aquacomputer_d5next) Fix incorrect PWM value readout
Browse files Browse the repository at this point in the history
Commit 662d20b3a5af ("hwmon: (aquacomputer_d5next) Add support for
temperature sensor offsets") changed aqc_get_ctrl_val() to return
the value through a parameter instead of through the return value,
but didn't fix up a case that relied on the old behavior. Fix it
to use the proper received value and not the return code.

Fixes: 662d20b3a5af ("hwmon: (aquacomputer_d5next) Add support for temperature sensor offsets")
Cc: stable@vger.kernel.org
Signed-off-by: Aleksa Savic <savicaleksa83@gmail.com>
  • Loading branch information
aleksamagicka committed Jul 29, 2023
1 parent 76dd0b8 commit 1af0c22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aquacomputer_d5next.c
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,7 @@ static int aqc_read(struct device *dev, enum hwmon_sensor_types type, u32 attr,
if (ret < 0)
return ret;

*val = aqc_percent_to_pwm(ret);
*val = aqc_percent_to_pwm(*val);
break;
}
break;
Expand Down

0 comments on commit 1af0c22

Please sign in to comment.