Skip to content
Commit 9a3dce62 authored by Zhuang Yuyao's avatar Zhuang Yuyao Committed by Alexandre Belloni
Browse files

rtc: ds1307: ds3231 temperature s16 overflow



while retrieving temperature from ds3231, the result may be overflow
since s16 is too small for a multiplication with 250.

ie. if temp_buf[0] == 0x2d, the result (s16 temp) will be negative.

Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Tested-by: default avatarMichael Tatarinov <kukabu@gmail.com>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
parent 00c9329e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment