diff options
Diffstat (limited to 'arch/ia64/kernel/efi.c')
-rw-r--r-- | arch/ia64/kernel/efi.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c index 6216eba2e38f..5181bf551f3c 100644 --- a/arch/ia64/kernel/efi.c +++ b/arch/ia64/kernel/efi.c | |||
@@ -218,9 +218,10 @@ efi_gettimeofday (struct timespec *ts) | |||
218 | { | 218 | { |
219 | efi_time_t tm; | 219 | efi_time_t tm; |
220 | 220 | ||
221 | memset(ts, 0, sizeof(ts)); | 221 | if ((*efi.get_time)(&tm, NULL) != EFI_SUCCESS) { |
222 | if ((*efi.get_time)(&tm, NULL) != EFI_SUCCESS) | 222 | memset(ts, 0, sizeof(*ts)); |
223 | return; | 223 | return; |
224 | } | ||
224 | 225 | ||
225 | ts->tv_sec = mktime(tm.year, tm.month, tm.day, tm.hour, tm.minute, tm.second); | 226 | ts->tv_sec = mktime(tm.year, tm.month, tm.day, tm.hour, tm.minute, tm.second); |
226 | ts->tv_nsec = tm.nanosecond; | 227 | ts->tv_nsec = tm.nanosecond; |