diff options
| author | Cosmo Chou <[email protected]> | 2024-08-19 10:46:30 +0000 |
|---|---|---|
| committer | Guenter Roeck <[email protected]> | 2024-08-27 03:58:05 +0000 |
| commit | 7bbc079531fc38d401e1c4088d4981435a8828e3 (patch) | |
| tree | 1ae7c8e3b4d397bb4b2483c399d9051e94ae38f0 /security/selinux/hooks.c | |
| parent | hwmon: (asus-ec-sensors) remove VRM temp X570-E GAMING (diff) | |
| download | kernel-7bbc079531fc38d401e1c4088d4981435a8828e3.tar.gz kernel-7bbc079531fc38d401e1c4088d4981435a8828e3.zip | |
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 <[email protected]>
Message-ID: <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
Diffstat (limited to 'security/selinux/hooks.c')
0 files changed, 0 insertions, 0 deletions
