diff options
author | Ivan Zaentsev <ivan.zaentsev@wirenboard.ru> | 2021-01-21 12:30:21 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-01-27 16:59:16 +0300 |
commit | 2f6055c26f1913763eabc66c7c27d0693561e966 (patch) | |
tree | 84fd692bced8187050502677b844771f85aea088 /drivers/uio | |
parent | 2c104a469a4ce276117acda94ccf922c3b82d735 (diff) | |
download | linux-2f6055c26f1913763eabc66c7c27d0693561e966.tar.xz |
w1: w1_therm: Fix conversion result for negative temperatures
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: 9ace0b4dab1c (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>
Diffstat (limited to 'drivers/uio')
0 files changed, 0 insertions, 0 deletions