diff options
author | Michael Neuling <mikey@neuling.org> | 2006-03-14 17:11:51 +1100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-03-16 16:55:03 +1100 |
commit | 0e8ed479125a6d246e17cfe6c24e140bfeb01972 (patch) | |
tree | cf5ef655ed77c8f7c797e3aab696dbe2e90aedfb /arch/powerpc | |
parent | c6cb3b5f368bae67c0b258cfebc0b9dbd8e1d929 (diff) | |
download | linux-0e8ed479125a6d246e17cfe6c24e140bfeb01972.tar.bz2 |
[PATCH] powerpc: RTC memory corruption
We should be memset'ing the data we are pointing to, not the pointer
itself. This is in an error path so we probably don't hit it much.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kernel/rtas-rtc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/rtas-rtc.c b/arch/powerpc/kernel/rtas-rtc.c index 635d3b9a8811..34d073fb6091 100644 --- a/arch/powerpc/kernel/rtas-rtc.c +++ b/arch/powerpc/kernel/rtas-rtc.c @@ -52,7 +52,7 @@ void rtas_get_rtc_time(struct rtc_time *rtc_tm) error = rtas_call(rtas_token("get-time-of-day"), 0, 8, ret); if (error == RTAS_CLOCK_BUSY || rtas_is_extended_busy(error)) { if (in_interrupt() && printk_ratelimit()) { - memset(&rtc_tm, 0, sizeof(struct rtc_time)); + memset(rtc_tm, 0, sizeof(struct rtc_time)); printk(KERN_WARNING "error: reading clock" " would delay interrupt\n"); return; /* delay not allowed */ |