aboutsummaryrefslogtreecommitdiffstats
diff options
-rw-r--r--mm/cma_debug.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/cma_debug.c b/mm/cma_debug.c
index 5ae38f5abbcc1..523ba4a0f9f76 100644
--- a/mm/cma_debug.c
+++ b/mm/cma_debug.c
@@ -205,7 +205,8 @@ static int __init cma_debugfs_init(void)
cma_debugfs_root = debugfs_create_dir("cma", NULL);
for (i = 0; i < cma_area_count; i++)
- cma_debugfs_add_one(&cma_areas[i], cma_debugfs_root);
+ if (test_bit(CMA_ACTIVATED, &cma_areas[i].flags))
+ cma_debugfs_add_one(&cma_areas[i], cma_debugfs_root);
return 0;
}