Skip to content

Commit

Permalink
sparc64: Fix return value in update_persistent_clock().
Browse files Browse the repository at this point in the history
Noticed by Stephen Rothwell.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Sep 10, 2008
1 parent 503acc8 commit 90158d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/sparc64/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,14 +396,14 @@ 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;
int err = -1;

if (rtc) {
err = rtc_set_mmss(rtc, now.tv_sec);
rtc_class_close(rtc);
}

return -1;
return err;
}

unsigned long cmos_regs;
Expand Down

0 comments on commit 90158d8

Please sign in to comment.