Just thought this is easier to read.
Acked-by: Davide Libenzi <davidel@xmailserver.org>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
asmlinkage long compat_sys_timerfd(int ufd, int clockid, int flags,
const struct compat_itimerspec __user *utmr)
{
asmlinkage long compat_sys_timerfd(int ufd, int clockid, int flags,
const struct compat_itimerspec __user *utmr)
{
struct itimerspec t;
struct itimerspec __user *ut;
struct itimerspec t;
struct itimerspec __user *ut;
if (get_compat_itimerspec(&t, utmr))
if (get_compat_itimerspec(&t, utmr))
ut = compat_alloc_user_space(sizeof(*ut));
ut = compat_alloc_user_space(sizeof(*ut));
- if (copy_to_user(ut, &t, sizeof(t)) )
- goto err_exit;
+ if (copy_to_user(ut, &t, sizeof(t)))
+ return -EFAULT;
- res = sys_timerfd(ufd, clockid, flags, ut);
-err_exit:
- return res;
+ return sys_timerfd(ufd, clockid, flags, ut);
}
#endif /* CONFIG_TIMERFD */
}
#endif /* CONFIG_TIMERFD */