Commit 6cc6b122 authored by Carsten Otte's avatar Carsten Otte Committed by Linus Torvalds

[PATCH] remove needless check in fs/read_write.c

nr_segs is unsigned long and thus cannot be negative.  We checked against 0
few lines before.
Signed-off-by: default avatarCarsten Otte <cotte@de.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 55148548
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment