slub: Correct the error code when slab_kset is NULL
authorXiongwei Song <xiongwei.song@windriver.com>
Thu, 13 Apr 2023 14:34:48 +0000 (22:34 +0800)
committerVlastimil Babka <vbabka@suse.cz>
Mon, 22 May 2023 13:20:21 +0000 (15:20 +0200)
commit35973232b5cddd8b03dac2730cd1ca53137d1cd4
treea186cde6f46a8ad09d81c06755c019c8478eaf00
parent444f20c29e8b41a5aef5c34e3eab84e8d1cc4511
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>
mm/slub.c