diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2025-12-20 12:22:53 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2025-12-20 12:22:53 -0800 |
| commit | f0ae3a50624b39f9c5a235ee6caa2566118a1740 (patch) | |
| tree | 64eb5d3c10f2a33ced9f4745989f87946438b296 /drivers/hwmon/tmp401.c | |
| parent | 3ed22a356c107767bf8d5a6a22ac79a293e65956 (diff) | |
| parent | b3db91c3bfea69a6c6258fea508f25a59c0feb1a (diff) | |
Merge tag 'hwmon-for-v6.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull hwmon fixes from Guenter Roeck:
- ltc4282: Fix reset_history file permissions
- ds620: Update broken Datasheet URL in driver documentation
- tmp401: Fix overflow caused by default conversion rate value
- ibmpex: Fix use-after-free in high/low store
- dell-smm: Limit fan multiplier to avoid overflow
* tag 'hwmon-for-v6.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
hwmon: (ltc4282): Fix reset_history file permissions
hwmon: (DS620) Update broken Datasheet URL in driver documentation
hwmon: (tmp401) fix overflow caused by default conversion rate value
hwmon: (ibmpex) fix use-after-free in high/low store
hwmon: (dell-smm) Limit fan multiplier to avoid overflow
Diffstat (limited to 'drivers/hwmon/tmp401.c')
| -rw-r--r-- | drivers/hwmon/tmp401.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/tmp401.c b/drivers/hwmon/tmp401.c index fbaa34973694..07f596581c6e 100644 --- a/drivers/hwmon/tmp401.c +++ b/drivers/hwmon/tmp401.c @@ -397,7 +397,7 @@ static int tmp401_chip_read(struct device *dev, u32 attr, int channel, long *val ret = regmap_read(data->regmap, TMP401_CONVERSION_RATE, ®val); if (ret < 0) return ret; - *val = (1 << (7 - regval)) * 125; + *val = (1 << (7 - min(regval, 7))) * 125; break; case hwmon_chip_temp_reset_history: *val = 0; |
