Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8317f14b authored by Heiko Carstens's avatar Heiko Carstens Committed by Linus Torvalds
Browse files

simplify compat_sys_timerfd



Just thought this is easier to read.

Acked-by: default avatarDavide Libenzi <davidel@xmailserver.org>
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d55e2ca8
Loading
Loading
Loading
Loading
+4 −9
Original line number Diff line number Diff line
@@ -2230,21 +2230,16 @@ asmlinkage long compat_sys_signalfd(int ufd,
asmlinkage long compat_sys_timerfd(int ufd, int clockid, int flags,
				   const struct compat_itimerspec __user *utmr)
{
	long res;
	struct itimerspec t;
	struct itimerspec __user *ut;

	res = -EFAULT;
	if (get_compat_itimerspec(&t, utmr))
		goto err_exit;
		return -EFAULT;
	ut = compat_alloc_user_space(sizeof(*ut));
	if (copy_to_user(ut, &t, sizeof(t)))
		goto err_exit;
		return -EFAULT;

	res = sys_timerfd(ufd, clockid, flags, ut);
err_exit:
	return res;
	return sys_timerfd(ufd, clockid, flags, ut);
}

#endif /* CONFIG_TIMERFD */