aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cgroup.c
diff options
context:
space:
mode:
authorFengguang Wu <fengguang.wu@intel.com>2014-02-13 16:42:43 -0500
committerTejun Heo <tj@kernel.org>2014-02-13 16:42:45 -0500
commit430af8ad9dad82d775d688155e1db1da385d3e7a (patch)
tree80aa4c350091f772884564fe0c009fdac3f9a534 /kernel/cgroup.c
parentd6250ee2fa79637a5750e46734816c7af71ea97e (diff)
cgroup: fix coccinelle warnings
kernel/cgroup.c:2256:1-3: WARNING: PTR_RET can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: coccinelle/api/ptr_ret.cocci Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r--kernel/cgroup.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 750d0e1e7e56..15dcae74b510 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -2171,9 +2171,7 @@ static int cgroup_add_file(struct cgroup *cgrp, struct cftype *cft)
2171 kn = __kernfs_create_file(cgrp->kn, cgroup_file_name(cgrp, cft, name), 2171 kn = __kernfs_create_file(cgrp->kn, cgroup_file_name(cgrp, cft, name),
2172 cgroup_file_mode(cft), 0, cft->kf_ops, cft, 2172 cgroup_file_mode(cft), 0, cft->kf_ops, cft,
2173 NULL, false, key); 2173 NULL, false, key);
2174 if (IS_ERR(kn)) 2174 return PTR_ERR_OR_ZERO(kn);
2175 return PTR_ERR(kn);
2176 return 0;
2177} 2175}
2178 2176
2179/** 2177/**