From: Jesper Juhl Improve readability after verify_area to access_ok conversion. The new code was pretty ugly - this should be a bit better. Signed-off-by: Jesper Juhl Signed-off-by: Andrew Morton --- 25-akpm/arch/alpha/kernel/osf_sys.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff -puN arch/alpha/kernel/osf_sys.c~arch_alpha_kernel_osf_sys-tiny-cleanup-retvalpatch arch/alpha/kernel/osf_sys.c --- 25/arch/alpha/kernel/osf_sys.c~arch_alpha_kernel_osf_sys-tiny-cleanup-retvalpatch 2005-03-06 20:51:29.000000000 -0800 +++ 25-akpm/arch/alpha/kernel/osf_sys.c 2005-03-06 20:51:29.000000000 -0800 @@ -989,18 +989,19 @@ osf_select(int n, fd_set __user *inp, fd char *bits; size_t size; long timeout; - int ret; + int ret -EINVAL; timeout = MAX_SCHEDULE_TIMEOUT; if (tvp) { time_t sec, usec; - if ((ret = access_ok(VERIFY_READ, tvp, sizeof(*tvp)) ? 0 : -EFAULT) - || (ret = __get_user(sec, &tvp->tv_sec)) - || (ret = __get_user(usec, &tvp->tv_usec))) + if (!access_ok(VERIFY_READ, tvp, sizeof(*tvp) + || __get_user(sec, &tvp->tv_sec) + || __get_user(usec, &tvp->tv_usec)) { + ret = -EFAULT; goto out_nofds; + } - ret = -EINVAL; if (sec < 0 || usec < 0) goto out_nofds; @@ -1010,7 +1011,6 @@ osf_select(int n, fd_set __user *inp, fd } } - ret = -EINVAL; if (n < 0 || n > current->files->max_fdset) goto out_nofds; _