summaryrefslogtreecommitdiff
path: root/kernel/time/alarmtimer.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/time/alarmtimer.c')
-rw-r--r--kernel/time/alarmtimer.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/kernel/time/alarmtimer.c b/kernel/time/alarmtimer.c
index 57bcf94ee132..7bed4e44f9bd 100644
--- a/kernel/time/alarmtimer.c
+++ b/kernel/time/alarmtimer.c
@@ -721,15 +721,7 @@ static int alarmtimer_do_nsleep(struct alarm *alarm, ktime_t absexp,
return 0;
rmt = ktime_to_timespec(rem);
-#ifdef CONFIG_COMPAT
- if (restart->nanosleep.type == TT_COMPAT) {
- if (compat_put_timespec(&rmt,
- restart->nanosleep.compat_rmtp))
- return -EFAULT;
- } else
-#endif
- if (copy_to_user(restart->nanosleep.rmtp, &rmt, sizeof(rmt)))
- return -EFAULT;
+ return nanosleep_copyout(restart, &rmt);
}
return -ERESTART_RESTARTBLOCK;
}