From: Paul Mackerras Date: Sat, 22 Oct 2005 05:57:55 +0000 (+1000) Subject: powerpc: Make set_rtc_time() return error code from lower-level function X-Git-Tag: v2.6.15-rc1~59^2~120 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b6ba92819dc1304a4e5a0bf06b297c657b58168a;p=linux-2.6 powerpc: Make set_rtc_time() return error code from lower-level function Previously it ignored the return value from ppc_md.set_rtc_time, but in fact the functions that that can point to do return a useful error code, so return it from set_rtc_time(). Signed-off-by: Paul Mackerras --- diff --git a/include/asm-powerpc/rtc.h b/include/asm-powerpc/rtc.h index d38f2a077d..f5802926b6 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; }