Skip to content

Commit 3597323

Browse files
Xiongwei Songtehcaster
authored andcommitted
slub: Correct the error code when slab_kset is NULL
The -ENOSYS is inproper when kset_create_and_add call returns a NULL pointer, the failure more likely is because lacking memory, hence returning -ENOMEM is better. Signed-off-by: Xiongwei Song <xiongwei.song@windriver.com> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
1 parent 444f20c commit 3597323

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mm/slub.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6224,7 +6224,7 @@ static int __init slab_sysfs_init(void)
62246224
if (!slab_kset) {
62256225
mutex_unlock(&slab_mutex);
62266226
pr_err("Cannot register slab subsystem.\n");
6227-
return -ENOSYS;
6227+
return -ENOMEM;
62286228
}
62296229

62306230
slab_state = FULL;

0 commit comments

Comments
 (0)