sparc64: Fix return value in update_persistent_clock().
Noticed by Stephen Rothwell.
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c
index 8a2fa0e..8d2ca04 100644
--- a/arch/sparc64/kernel/time.c
+++ b/arch/sparc64/kernel/time.c
@@ -396,14 +396,14 @@
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;