Skip to content

Commit

Permalink
powerpc: Make set_rtc_time() return error code from lower-level function
Browse files Browse the repository at this point in the history
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 <paulus@samba.org>
  • Loading branch information
Paul Mackerras committed Oct 22, 2005
1 parent ef1a128 commit b6ba928
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions include/asm-powerpc/rtc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit b6ba928

Please sign in to comment.