aboutsummaryrefslogtreecommitdiffstats
path: root/fs/read_write.c
diff options
context:
space:
mode:
authorCarsten Otte <cotte@de.ibm.com>2006-03-25 06:08:23 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-25 11:23:01 -0500
commit6cc6b1226b71132a1d6e95449d78e051f1f3b506 (patch)
treea301ab0b16a5135e777b96e1883f281fa711bf93 /fs/read_write.c
parent55148548124e3e52e8921f1cb0e325111ef9cbb1 (diff)
[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: Carsten Otte <cotte@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/read_write.c')
-rw-r--r--fs/read_write.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/read_write.c b/fs/read_write.c
index 3f7a1a62165f..34b1bf259efd 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -470,7 +470,7 @@ static ssize_t do_readv_writev(int type, struct file *file,
470 * verify all the pointers 470 * verify all the pointers
471 */ 471 */
472 ret = -EINVAL; 472 ret = -EINVAL;
473 if ((nr_segs > UIO_MAXIOV) || (nr_segs <= 0)) 473 if (nr_segs > UIO_MAXIOV)
474 goto out; 474 goto out;
475 if (!file->f_op) 475 if (!file->f_op)
476 goto out; 476 goto out;