diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2017-08-09 06:25:21 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2017-08-11 13:33:28 -0400 |
commit | 696b98f244f77a79840bf420861c996d61c82637 (patch) | |
tree | 8085a1bfa4e633ecc489c9ea9d9ffa690b12620f | |
parent | 3e48930cc74f0c212ee1838f89ad0ca7fcf2fea1 (diff) |
cgroup: remove unneeded checks
"descendants" and "depth" are declared as int, so they can't be larger
than INT_MAX. Static checkers complain and it's slightly confusing for
humans as well so let's just remove these conditions.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
-rw-r--r-- | kernel/cgroup/cgroup.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c index c038ccf95b5d..1591e9b20122 100644 --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c | |||
@@ -3223,7 +3223,7 @@ static ssize_t cgroup_max_descendants_write(struct kernfs_open_file *of, | |||
3223 | return ret; | 3223 | return ret; |
3224 | } | 3224 | } |
3225 | 3225 | ||
3226 | if (descendants < 0 || descendants > INT_MAX) | 3226 | if (descendants < 0) |
3227 | return -ERANGE; | 3227 | return -ERANGE; |
3228 | 3228 | ||
3229 | cgrp = cgroup_kn_lock_live(of->kn, false); | 3229 | cgrp = cgroup_kn_lock_live(of->kn, false); |
@@ -3266,7 +3266,7 @@ static ssize_t cgroup_max_depth_write(struct kernfs_open_file *of, | |||
3266 | return ret; | 3266 | return ret; |
3267 | } | 3267 | } |
3268 | 3268 | ||
3269 | if (depth < 0 || depth > INT_MAX) | 3269 | if (depth < 0) |
3270 | return -ERANGE; | 3270 | return -ERANGE; |
3271 | 3271 | ||
3272 | cgrp = cgroup_kn_lock_live(of->kn, false); | 3272 | cgrp = cgroup_kn_lock_live(of->kn, false); |