Skip to content

Commit a746b36

Browse files
aleksamagickagroeck
authored andcommitted
hwmon: (aquacomputer_d5next) Fix incorrect PWM value readout
Commit 662d20b ("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: 662d20b ("hwmon: (aquacomputer_d5next) Add support for temperature sensor offsets") Cc: [email protected] Signed-off-by: Aleksa Savic <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]>
1 parent 368da76 commit a746b36

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hwmon/aquacomputer_d5next.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1027,7 +1027,7 @@ static int aqc_read(struct device *dev, enum hwmon_sensor_types type, u32 attr,
10271027
if (ret < 0)
10281028
return ret;
10291029

1030-
*val = aqc_percent_to_pwm(ret);
1030+
*val = aqc_percent_to_pwm(*val);
10311031
break;
10321032
}
10331033
break;

0 commit comments

Comments
 (0)