Commit 52c270d3 authored by Dan Carpenter's avatar Dan Carpenter Committed by Linus Torvalds
Browse files

test_kmod: flip INT checks to be consistent

Most checks will check for min and then max, except the int check.  Flip
the checks to be consistent with the other code.

[ massaged commit log]

Signed-off-by: default avatarDan Carpenter <>
Signed-off-by: Luis Chamberlain's avatarLuis R. Rodriguez <>
Cc: Dmitry Torokhov <>
Cc: Kees Cook <>
Cc: Jessica Yu <>
Cc: Rusty Russell <>
Cc: Michal Marek <>
Cc: Petr Mladek <>
Cc: Miroslav Benes <>
Cc: Josh Poimboeuf <>
Cc: Eric W. Biederman <>
Cc: Shuah Khan <>
Cc: Colin Ian King <>
Cc: David Binderman <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent f520409c
......@@ -946,7 +946,7 @@ static int test_dev_config_update_int(struct kmod_test_device *test_dev,
if (ret)
return ret;
if (new > INT_MAX || new < INT_MIN)
if (new < INT_MIN || new > INT_MAX)
return -EINVAL;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment