From: Carsten Otte Date: Sat, 25 Mar 2006 11:08:23 +0000 (-0800) Subject: [PATCH] remove needless check in fs/read_write.c X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6cc6b1226b71132a1d6e95449d78e051f1f3b506;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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, * 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;