Skip to content

Commit

Permalink
[PATCH] remove needless check in fs/read_write.c
Browse files Browse the repository at this point in the history
nr_segs is unsigned long and thus cannot be negative.  We checked against 0
few lines before.

Signed-off-by: Carsten Otte <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Carsten Otte authored and Linus Torvalds committed Mar 25, 2006
1 parent 5514854 commit 6cc6b12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/read_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6cc6b12

Please sign in to comment.