From: Shawn Lin Date: Mon, 22 Aug 2016 07:45:59 +0000 (+0800) Subject: fs: compat: remove redundant check of nr_segs X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=85e7340f21d3a88883e54cd2a5d7ebf04e827eeb;p=linux-beck.git 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 Signed-off-by: Al Viro --- 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;