提交 088a3962 编写于 作者: D David S. Miller

sparc64: Add missing rtc_close() in update_persistent_clock()

Noticed by David Brownell.
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 7b1af32f
......@@ -396,9 +396,12 @@ static unsigned long timer_ticks_per_nsec_quotient __read_mostly;
int update_persistent_clock(struct timespec now)
{
struct rtc_device *rtc = rtc_class_open("rtc0");
int err;
if (rtc)
return rtc_set_mmss(rtc, now.tv_sec);
if (rtc) {
err = rtc_set_mmss(rtc, now.tv_sec);
rtc_class_close(rtc);
}
return -1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册