summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/cgroup.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 3fe01102607b..771d1b8aaae9 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -2348,6 +2348,9 @@ int cgroup_add_cftypes(struct cgroup_subsys *ss, struct cftype *cfts)
{
int ret;
+ if (!cfts || cfts[0].name[0] == '\0')
+ return 0;
+
ret = cgroup_init_cftypes(ss, cfts);
if (ret)
return ret;