diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 750d0e1e7e56405ca47fc338f73ac8acd6bd5cea..15dcae74b51061028cfffdc1eb63ebdd3d964733 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -2171,9 +2171,7 @@ static int cgroup_add_file(struct cgroup *cgrp, struct cftype *cft) kn = __kernfs_create_file(cgrp->kn, cgroup_file_name(cgrp, cft, name), cgroup_file_mode(cft), 0, cft->kf_ops, cft, NULL, false, key); - if (IS_ERR(kn)) - return PTR_ERR(kn); - return 0; + return PTR_ERR_OR_ZERO(kn); } /**