Commit 85e7340f21d3a88883e54cd2a5d7ebf04e827eeb

Authored by Shawn Lin
Committed by Al Viro
1 parent a818101d7b

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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -562,7 +562,7 @@
562 562 goto out;
563 563  
564 564 ret = -EINVAL;
565   - if (nr_segs > UIO_MAXIOV || nr_segs < 0)
  565 + if (nr_segs > UIO_MAXIOV)
566 566 goto out;
567 567 if (nr_segs > fast_segs) {
568 568 ret = -ENOMEM;