Commit 3e9f4df0 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'hwmon-for-linus-v4.16-rc2' of...

Merge tag 'hwmon-for-linus-v4.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon fix from Guenter Roeck:
 "Fix bad temperature display on Ryzen/Threadripper"

* tag 'hwmon-for-linus-v4.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (k10temp) Only apply temperature offset if result is positive
parents 2439f976 aef17ca1
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -129,7 +129,10 @@ static ssize_t temp1_input_show(struct device *dev,

	data->read_tempreg(data->pdev, &regval);
	temp = (regval >> 21) * 125;
	if (temp > data->temp_offset)
		temp -= data->temp_offset;
	else
		temp = 0;

	return sprintf(buf, "%u\n", temp);
}