mirror of
https://github.com/torvalds/linux.git
synced 2026-11-28 09:22:27 +00:00
DS18B20 device driver returns an incorrect value for negative temperatures
due to a missing sign-extension in w1_DS18B20_convert_temp().
Fix by using s16 temperature value when converting to int.
Fixes: 9ace0b4dab (w1: w1_therm: Add support for GXCAS GX20MH01 device.)
Cc: stable <[email protected]>
Reported-by: Paweł Marciniak <[email protected]>
Signed-off-by: Ivan Zaentsev <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>