aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/asm-powerpc/rtc.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/asm-powerpc/rtc.h b/include/asm-powerpc/rtc.h
index d38f2a077db..f5802926b6c 100644
--- a/include/asm-powerpc/rtc.h
+++ b/include/asm-powerpc/rtc.h
@@ -52,10 +52,8 @@ static inline unsigned int get_rtc_time(struct rtc_time *time)
/* Set the current date and time in the real time clock. */
static inline int set_rtc_time(struct rtc_time *time)
{
- if (ppc_md.get_rtc_time) {
- ppc_md.set_rtc_time(time);
- return 0;
- }
+ if (ppc_md.set_rtc_time)
+ return ppc_md.set_rtc_time(time);
return -EINVAL;
}