Browse Source

sparc64: Fix return value in update_persistent_clock().

Noticed by Stephen Rothwell.

Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller 17 years ago
parent
commit
90158d84eb
1 changed files with 2 additions and 2 deletions
  1. 2 2
      arch/sparc64/kernel/time.c

+ 2 - 2
arch/sparc64/kernel/time.c

@@ -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;