Skip to content
Commit 5204a611 authored by Baruch Siach's avatar Baruch Siach Committed by Paul Gortmaker
Browse files

rtc: pcf8523: don't return invalid date when battery is low



commit ecb4a353 upstream.

The RTC_VL_READ ioctl reports the low battery condition. Still,
pcf8523_rtc_read_time() happily returns invalid dates in this case.
Check the battery health on pcf8523_rtc_read_time() to avoid that.

Reported-by: default avatarErik Čuk <erik.cuk@domel.com>
Signed-off-by: default avatarBaruch Siach <baruch@tkos.co.il>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
parent ca57ee52
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment