sparc64: Add missing rtc_close() in update_persistent_clock()
Noticed by David Brownell. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
7b1af32f52
commit
088a396236
|
@ -396,9 +396,12 @@ static unsigned long timer_ticks_per_nsec_quotient __read_mostly;
|
||||||
int update_persistent_clock(struct timespec now)
|
int update_persistent_clock(struct timespec now)
|
||||||
{
|
{
|
||||||
struct rtc_device *rtc = rtc_class_open("rtc0");
|
struct rtc_device *rtc = rtc_class_open("rtc0");
|
||||||
|
int err;
|
||||||
|
|
||||||
if (rtc)
|
if (rtc) {
|
||||||
return rtc_set_mmss(rtc, now.tv_sec);
|
err = rtc_set_mmss(rtc, now.tv_sec);
|
||||||
|
rtc_class_close(rtc);
|
||||||
|
}
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue