aboutsummaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-m41t80.c
diff options
context:
space:
mode:
authorGravatar Colin Ian King <colin.king@canonical.com> 2021-09-28 14:46:54 +0100
committerGravatar Alexandre Belloni <alexandre.belloni@bootlin.com> 2021-10-01 23:28:46 +0200
commitf3606687b447c41d28a011c98373b62b1cd52345 (patch)
treeb8d85f97457b4a32c252b7c17ad8ccf6be2302fb /drivers/rtc/rtc-m41t80.c
parentrtc: mcp795: Add SPI ID table (diff)
downloadlinux-f3606687b447c41d28a011c98373b62b1cd52345.tar.gz
linux-f3606687b447c41d28a011c98373b62b1cd52345.tar.bz2
linux-f3606687b447c41d28a011c98373b62b1cd52345.zip
rtc: msc313: Fix unintentional sign extension issues with left shift of a u16
Shifting the u16 value returned by readw by 16 bits to the left will be promoted to a 32 bit signed int and then sign-extended to an unsigned long. If the top bit of the readw is set then the shifted value will be sign extended and the top 32 bits of the result will be set. Fixes: be7d9c9161b9 ("rtc: Add support for the MSTAR MSC313 RTC") Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Romain Perier <romain.perier@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20210928134654.991923-1-colin.king@canonical.com
Diffstat (limited to 'drivers/rtc/rtc-m41t80.c')
0 files changed, 0 insertions, 0 deletions