1
0
Fork 0

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>
hifive-unleashed-5.1
Shawn Lin 2016-08-22 15:45:59 +08:00 committed by Al Viro
parent a818101d7b
commit 85e7340f21
1 changed files with 1 additions and 1 deletions

View File

@ -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;