summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/debugobjects.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/debugobjects.c b/lib/debugobjects.c
index 24c1df0d7466..70935ed91125 100644
--- a/lib/debugobjects.c
+++ b/lib/debugobjects.c
@@ -1188,8 +1188,7 @@ void __init debug_objects_mem_init(void)
if (!obj_cache || debug_objects_replace_static_objects()) {
debug_objects_enabled = 0;
- if (obj_cache)
- kmem_cache_destroy(obj_cache);
+ kmem_cache_destroy(obj_cache);
pr_warn("out of memory.\n");
} else
debug_objects_selftest();