diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/slub.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/mm/slub.c b/mm/slub.c index 6e7e8106e9a6..f1b4d4dc3bb3 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -5755,10 +5755,8 @@ static int sysfs_slab_add(struct kmem_cache *s) s->kobj.kset = kset; err = kobject_init_and_add(&s->kobj, &slab_ktype, NULL, "%s", name); - if (err) { - kobject_put(&s->kobj); + if (err) goto out; - } err = sysfs_create_group(&s->kobj, &slab_attr_group); if (err) |