m32r: remove redundant tests on unsigned
`off' and `max_cpus' are unsigned. When negative they are wrapped and caught by the other test. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: Hirokazu Takata <takata@linux-m32r.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
1f69366545
commit
d5a6d17395
@ -77,7 +77,7 @@ static int ptrace_read_user(struct task_struct *tsk, unsigned long off,
|
||||
struct user * dummy = NULL;
|
||||
#endif
|
||||
|
||||
if ((off & 3) || (off < 0) || (off > sizeof(struct user) - 3))
|
||||
if ((off & 3) || off > sizeof(struct user) - 3)
|
||||
return -EIO;
|
||||
|
||||
off >>= 2;
|
||||
@ -139,8 +139,7 @@ static int ptrace_write_user(struct task_struct *tsk, unsigned long off,
|
||||
struct user * dummy = NULL;
|
||||
#endif
|
||||
|
||||
if ((off & 3) || off < 0 ||
|
||||
off > sizeof(struct user) - 3)
|
||||
if ((off & 3) || off > sizeof(struct user) - 3)
|
||||
return -EIO;
|
||||
|
||||
off >>= 2;
|
||||
|
Reference in New Issue
Block a user