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:Erik Čuk <erik.cuk@domel.com> Signed-off-by:
Baruch Siach <baruch@tkos.co.il> Signed-off-by:
Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by:
Paul Gortmaker <paul.gortmaker@windriver.com>
Loading
Please register or sign in to comment