Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 85e7340f authored by Shawn Lin's avatar Shawn Lin Committed by Al Viro
Browse files

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: default avatarShawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent a818101d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;