diff options
author | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-01-21 18:14:13 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-01-21 18:14:13 +1100 |
commit | 82f3a9ec86123951bc206517c38f4581d2345c40 (patch) | |
tree | d79fb32fce4e20c2ded1f8745aaa964fa531764b /core/rtc.c | |
parent | 82f0a29720190172fe889af266ce62270bd46c10 (diff) | |
download | skiboot-82f3a9ec86123951bc206517c38f4581d2345c40.zip skiboot-82f3a9ec86123951bc206517c38f4581d2345c40.tar.gz skiboot-82f3a9ec86123951bc206517c38f4581d2345c40.tar.bz2 |
Unlock rtc cache lock when cache isn't valid
Otherwise we crash with recursive lock error during boot on some systems
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core/rtc.c')
-rw-r--r-- | core/rtc.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -42,8 +42,11 @@ int rtc_cache_get(struct tm *tm) unsigned long cache_age_sec; lock(&rtc_tod_lock); - if (!rtc_tod_cache.valid) + + if (!rtc_tod_cache.valid) { + unlock(&rtc_tod_lock); return -1; + } cache_age_sec = tb_to_msecs(mftb() - rtc_tod_cache.tb) / 1000; *tm = rtc_tod_cache.tm; |