diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2017-08-01 15:58:11 -0700 |
---|---|---|
committer | Luis R. Rodriguez <mcgrof@kernel.org> | 2017-08-01 17:17:28 -0700 |
commit | 18bfb8d59d5aed8aed562016096dc41bafbbaccf (patch) | |
tree | 647f27b470ffc84720052cc836335fff4f72ecac | |
parent | c50634d04397a65f0570ebfc7403ee0962ece6d3 (diff) | |
download | linux-next-20170801-kmod-for-v4.14.tar.gz |
test_kmod: flip INT checks to be consistent20170801-kmod-for-v4.14
Most checks will check for min and then max, except the int check.
Flip the checks to be consistent with the other code.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
[mcgrof: massaged commit log]
Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
-rw-r--r-- | lib/test_kmod.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/test_kmod.c b/lib/test_kmod.c index 67fc7b9f41e394..fba78d25e82569 100644 --- a/lib/test_kmod.c +++ b/lib/test_kmod.c @@ -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; mutex_lock(&test_dev->config_mutex); |