Files
linux/drivers/hwmon
Cosmo Chou 7bbc079531 hwmon: (pt5161l) Fix invalid temperature reading
The temperature reading function was using a signed long for the ADC
code, which could lead to mishandling of invalid codes on 32-bit
platforms. This allowed out-of-range ADC codes to be incorrectly
interpreted as valid values and used in temperature calculations.

Change adc_code to u32 to ensure that invalid ADC codes are correctly
identified on all platforms.

Fixes: 1b2ca93cd0 ("hwmon: Add driver for Astera Labs PT5161L retimer")
Signed-off-by: Cosmo Chou <[email protected]>
Message-ID: <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
2024-08-26 20:58:05 -07:00
..
…
…
…
…
…
2024-06-13 16:44:34 -07:00
…
…
…
2024-02-25 12:37:10 -08:00