forked from luck/tmp_suning_uos_patched
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 <paulus@samba.org>
This commit is contained in:
parent
ef1a12817a
commit
b6ba92819d
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user