diff options
Diffstat (limited to 'mm/slub.c')
-rw-r--r-- | mm/slub.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mm/slub.c b/mm/slub.c index be493bd63c3..d73f771d278 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -4593,8 +4593,11 @@ static int sysfs_slab_add(struct kmem_cache *s) } err = sysfs_create_group(&s->kobj, &slab_attr_group); - if (err) + if (err) { + kobject_del(&s->kobj); + kobject_put(&s->kobj); return err; + } kobject_uevent(&s->kobj, KOBJ_ADD); if (!unmergeable) { /* Setup first alias */ |