From: Heiko Carstens Date: Thu, 17 May 2007 05:11:08 +0000 (-0700) Subject: simplify compat_sys_timerfd X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8317f14b60c02c69cf7f594e2aabc8a3fdc9618d;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git simplify compat_sys_timerfd Just thought this is easier to read. Acked-by: Davide Libenzi Signed-off-by: Heiko Carstens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/compat.c b/fs/compat.c index 7b21b0a82596..1de2331db844 100644 --- a/fs/compat.c +++ b/fs/compat.c @@ -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; + 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 */ -