[patch] [trivial] remove needless check in fs/read_write.c
From: Carsten Otte
Date: Tue Mar 21 2006 - 08:27:22 EST
nr_segs is unsigned long and thus cannot be negative. we checked against 0
few lines before.
signed-off-by: Carsten Otte <cotte@xxxxxxxxxx>
--
diff -ruN linux-2.6.16/fs/read_write.c linux-2.6.16-fix/fs/read_write.c
--- linux-2.6.16/fs/read_write.c 2006-03-20 06:53:29.000000000 +0100
+++ linux-2.6.16-fix/fs/read_write.c 2006-03-21 14:03:17.000000000 +0100
@@ -470,7 +470,7 @@
* 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;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/