simplify compat_sys_timerfd
authorHeiko Carstens <[email protected]>
Thu, 17 May 2007 05:11:08 +0000 (22:11 -0700)
committerLinus Torvalds <[email protected]>
Thu, 17 May 2007 12:23:04 +0000 (05:23 -0700)
Just thought this is easier to read.

Acked-by: Davide Libenzi <[email protected]>
Signed-off-by: Heiko Carstens <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
fs/compat.c

index 7b21b0a82596f77ed36d844e67d35f1e32934e9a..1de2331db8445d0923dfd17e6608d1357f466b3c 100644 (file)
@@ -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 */
-