Commit fb5451e4 authored by Jesper Juhl's avatar Jesper Juhl Committed by Linus Torvalds

[PATCH] arch/alpha/kernel/osf_sys: tiny cleanup to retval

Improve readability after verify_area to access_ok conversion.  The new code
was pretty ugly - this should be a bit better.
Signed-off-by: default avatarJesper Juhl <jesper.juhl@gmail.com>
Cc: Richard Henderson <rth@twiddle.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 8200dccd
...@@ -989,18 +989,19 @@ osf_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp, ...@@ -989,18 +989,19 @@ osf_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp,
char *bits; char *bits;
size_t size; size_t size;
long timeout; long timeout;
int ret; int ret = -EINVAL;
timeout = MAX_SCHEDULE_TIMEOUT; timeout = MAX_SCHEDULE_TIMEOUT;
if (tvp) { if (tvp) {
time_t sec, usec; time_t sec, usec;
if ((ret = access_ok(VERIFY_READ, tvp, sizeof(*tvp)) ? 0 : -EFAULT) if (!access_ok(VERIFY_READ, tvp, sizeof(*tvp))
|| (ret = __get_user(sec, &tvp->tv_sec)) || __get_user(sec, &tvp->tv_sec)
|| (ret = __get_user(usec, &tvp->tv_usec))) || __get_user(usec, &tvp->tv_usec)) {
ret = -EFAULT;
goto out_nofds; goto out_nofds;
}
ret = -EINVAL;
if (sec < 0 || usec < 0) if (sec < 0 || usec < 0)
goto out_nofds; goto out_nofds;
...@@ -1010,7 +1011,6 @@ osf_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp, ...@@ -1010,7 +1011,6 @@ osf_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp,
} }
} }
ret = -EINVAL;
if (n < 0 || n > current->files->max_fdset) if (n < 0 || n > current->files->max_fdset)
goto out_nofds; goto out_nofds;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment