Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
w1: w1_therm: Fix conversion result for negative temperatures
commit 2f6055c upstream. 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. See: raspberrypi/linux#4124 Fixes: 9ace0b4 (w1: w1_therm: Add support for GXCAS GX20MH01 device.) Cc: stable <stable@vger.kernel.org> Reported-by: Paweł Marciniak <sunwire@gmail.com> Signed-off-by: Ivan Zaentsev <ivan.zaentsev@wirenboard.ru> Link: https://lore.kernel.org/r/20210121093021.224764-1-ivan.zaentsev@wirenboard.ru Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Fang Yafen <yafen@iscas.ac.cn>
- Loading branch information