rtc: HYM8563: don't call rtc_year_days
authorHuang, Tao <huangtao@rock-chips.com>
Thu, 12 Mar 2015 07:48:12 +0000 (15:48 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Thu, 12 Mar 2015 07:48:12 +0000 (15:48 +0800)
commit9a742e52b1784553b3932eae8970bf96c26e8402
treeed1582ec6bb7cf5b23dc0b7a812dbcdf18b12d2a
parent29dc0928ee04c28a113327e120704d715d06c9c4
rtc: HYM8563: don't call rtc_year_days

If i2c error, the driver may call rtc_year_days with month -1, which will
cause crash. Fix this by never call rtc_year_days at all.

Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
drivers/rtc/rtc-HYM8563.c