diff options
author | David S. Miller <davem@davemloft.net> | 2008-09-10 16:35:08 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-09-10 16:35:08 -0400 |
commit | 90158d84eb20fa15e3c8010b570f3ea2c925121d (patch) | |
tree | 96ae78c63de912e83374a7dd5df013c63909af7b /arch/sparc64/kernel | |
parent | 503acc8a33b1f41a547517c9a592af5e5968f85c (diff) |
sparc64: Fix return value in update_persistent_clock().
Noticed by Stephen Rothwell.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel')
-rw-r--r-- | arch/sparc64/kernel/time.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c index 8a2fa0eb6602..8d2ca04d309e 100644 --- a/arch/sparc64/kernel/time.c +++ b/arch/sparc64/kernel/time.c | |||
@@ -396,14 +396,14 @@ 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 | int err = -1; |
400 | 400 | ||
401 | if (rtc) { | 401 | if (rtc) { |
402 | err = rtc_set_mmss(rtc, now.tv_sec); | 402 | err = rtc_set_mmss(rtc, now.tv_sec); |
403 | rtc_class_close(rtc); | 403 | rtc_class_close(rtc); |
404 | } | 404 | } |
405 | 405 | ||
406 | return -1; | 406 | return err; |
407 | } | 407 | } |
408 | 408 | ||
409 | unsigned long cmos_regs; | 409 | unsigned long cmos_regs; |