diff options
author | David S. Miller <davem@davemloft.net> | 2008-09-08 22:53:28 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-09-08 22:53:28 -0400 |
commit | 088a39623660f2875aaf15649bf663bbb5a8a219 (patch) | |
tree | eef3c9a708f2d00381f3a37c88e8ef5bf79e757d /arch/sparc64 | |
parent | 7b1af32f52077402157f8bb8fc22d8da17606095 (diff) |
sparc64: Add missing rtc_close() in update_persistent_clock()
Noticed by David Brownell.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64')
-rw-r--r-- | arch/sparc64/kernel/time.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c index 226a0042d870..8a2fa0eb6602 100644 --- a/arch/sparc64/kernel/time.c +++ b/arch/sparc64/kernel/time.c | |||
@@ -396,9 +396,12 @@ static unsigned long timer_ticks_per_nsec_quotient __read_mostly; | |||
396 | int update_persistent_clock(struct timespec now) | 396 | int update_persistent_clock(struct timespec now) |
397 | { | 397 | { |
398 | struct rtc_device *rtc = rtc_class_open("rtc0"); | 398 | struct rtc_device *rtc = rtc_class_open("rtc0"); |
399 | int err; | ||
399 | 400 | ||
400 | if (rtc) | 401 | if (rtc) { |
401 | return rtc_set_mmss(rtc, now.tv_sec); | 402 | err = rtc_set_mmss(rtc, now.tv_sec); |
403 | rtc_class_close(rtc); | ||
404 | } | ||
402 | 405 | ||
403 | return -1; | 406 | return -1; |
404 | } | 407 | } |