-/* $OpenBSD: linux_misc.c,v 1.92 2014/11/16 12:30:59 deraadt Exp $ */
+/* $OpenBSD: linux_misc.c,v 1.93 2015/05/02 14:43:06 jsg Exp $ */
/* $NetBSD: linux_misc.c,v 1.27 1996/05/20 01:59:21 fvdl Exp $ */
/*-
/*
* Return how many seconds were left (rounded up)
*/
- if (itp->it_value.tv_sec > LINUX_TIME_MAX)
+ if (itp->it_value.tv_sec > LINUX_TIME_MAX) {
+ splx(s);
return EOVERFLOW;
+ }
seconds_due = (linux_time_t)itp->it_value.tv_sec;
if (itp->it_value.tv_usec) {
- if (seconds_due == LINUX_TIME_MAX)
+ if (seconds_due == LINUX_TIME_MAX) {
+ splx(s);
return EOVERFLOW;
+ }
seconds_due++;
}
retval[0] = seconds_due;