aboutsummaryrefslogtreecommitdiff
path: root/lib/crypto/mpi/mpi-bit.c
diff options
context:
space:
mode:
authorCosmo Chou <chou.cosmo@gmail.com>2024-08-19 18:46:30 +0800
committerGuenter Roeck <linux@roeck-us.net>2024-08-26 20:58:05 -0700
commit7bbc079531fc38d401e1c4088d4981435a8828e3 (patch)
tree1ae7c8e3b4d397bb4b2483c399d9051e94ae38f0 /lib/crypto/mpi/mpi-bit.c
parent9efaebc0072b8e95505544bf385c20ee8a29d799 (diff)
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: 1b2ca93cd059 ("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>
Diffstat (limited to 'lib/crypto/mpi/mpi-bit.c')
0 files changed, 0 insertions, 0 deletions