-
Cosmo Chou authored
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: 1b2ca93c ("hwmon: Add driver for Astera Labs PT5161L retimer") Signed-off-by: Cosmo Chou <chou.cosmo@gmail.com> Message-ID: <20240819104630.2375441-1-chou.cosmo@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
7bbc0795