summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorShawn Lin <shawn.lin@rock-chips.com>2016-08-22 15:45:59 +0800
committerAl Viro <viro@zeniv.linux.org.uk>2016-09-27 18:47:38 -0400
commit85e7340f21d3a88883e54cd2a5d7ebf04e827eeb (patch)
treef502ff9ce4bf2962a72c5b7f47532c8deb631f01 /fs
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>
Diffstat (limited to 'fs')
-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,
goto out;
ret = -EINVAL;
- if (nr_segs > UIO_MAXIOV || nr_segs < 0)
+ if (nr_segs > UIO_MAXIOV)
goto out;
if (nr_segs > fast_segs) {
ret = -ENOMEM;