[PATCH] remove needless check in fs/read_write.c
authorCarsten Otte <cotte@de.ibm.com>
Sat, 25 Mar 2006 11:08:23 +0000 (03:08 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sat, 25 Mar 2006 16:23:01 +0000 (08:23 -0800)
nr_segs is unsigned long and thus cannot be negative.  We checked against 0
few lines before.

Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/read_write.c

index 3f7a1a62165f626e984de4849ce053cc8a824f65..34b1bf259efd239d5380282b689258285711fc5e 100644 (file)
@@ -470,7 +470,7 @@ static ssize_t do_readv_writev(int type, struct file *file,
         * verify all the pointers
         */
        ret = -EINVAL;
-       if ((nr_segs > UIO_MAXIOV) || (nr_segs <= 0))
+       if (nr_segs > UIO_MAXIOV)
                goto out;
        if (!file->f_op)
                goto out;