Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c2115240 authored by YueHaibing's avatar YueHaibing Committed by David S. Miller
Browse files

kcm: Remove unnecessary SLAB_PANIC for kmem_cache_create() in kcm_init



There has check NULL on kmem_cache_create on failure in kcm_init,
no need use SLAB_PANIC to panic the system.

Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 923b55cf
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2036,13 +2036,13 @@ static int __init kcm_init(void)

	kcm_muxp = kmem_cache_create("kcm_mux_cache",
				     sizeof(struct kcm_mux), 0,
				     SLAB_HWCACHE_ALIGN | SLAB_PANIC, NULL);
				     SLAB_HWCACHE_ALIGN, NULL);
	if (!kcm_muxp)
		goto fail;

	kcm_psockp = kmem_cache_create("kcm_psock_cache",
				       sizeof(struct kcm_psock), 0,
					SLAB_HWCACHE_ALIGN | SLAB_PANIC, NULL);
					SLAB_HWCACHE_ALIGN, NULL);
	if (!kcm_psockp)
		goto fail;