aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn Lin <shawn.lin@rock-chips.com>2016-08-22 03:45:59 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2016-09-27 18:47:38 -0400
commit85e7340f21d3a88883e54cd2a5d7ebf04e827eeb (patch)
treef502ff9ce4bf2962a72c5b7f47532c8deb631f01
parenta818101d7b92e76db2f9a597e4830734767473b9 (diff)
fs: compat: remove redundant check of nr_segs
nr_segs should never be less than zero as its type is unsigned long, so let's remove this check. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--fs/compat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/compat.c b/fs/compat.c
index be6e48b0a46c..5bc3a4b245bb 100644
--- a/fs/compat.c
+++ b/fs/compat.c
@@ -562,7 +562,7 @@ ssize_t compat_rw_copy_check_uvector(int type,
562 goto out; 562 goto out;
563 563
564 ret = -EINVAL; 564 ret = -EINVAL;
565 if (nr_segs > UIO_MAXIOV || nr_segs < 0) 565 if (nr_segs > UIO_MAXIOV)
566 goto out; 566 goto out;
567 if (nr_segs > fast_segs) { 567 if (nr_segs > fast_segs) {
568 ret = -ENOMEM; 568 ret = -ENOMEM;