Commit c06d7aaf authored by Haowen Bai's avatar Haowen Bai Committed by akpm

kernel: pid_namespace: use NULL instead of using plain integer as pointer

This fixes the following sparse warnings:
kernel/pid_namespace.c:55:77: warning: Using plain integer as NULL pointer

Link: https://lkml.kernel.org/r/1647944288-2806-1-git-send-email-baihaowen@meizu.comSigned-off-by: default avatarHaowen Bai <baihaowen@meizu.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 6308499b
...@@ -52,7 +52,7 @@ static struct kmem_cache *create_pid_cachep(unsigned int level) ...@@ -52,7 +52,7 @@ static struct kmem_cache *create_pid_cachep(unsigned int level)
/* Name collision forces to do allocation under mutex. */ /* Name collision forces to do allocation under mutex. */
if (!*pkc) if (!*pkc)
*pkc = kmem_cache_create(name, len, 0, *pkc = kmem_cache_create(name, len, 0,
SLAB_HWCACHE_ALIGN | SLAB_ACCOUNT, 0); SLAB_HWCACHE_ALIGN | SLAB_ACCOUNT, NULL);
mutex_unlock(&pid_caches_mutex); mutex_unlock(&pid_caches_mutex);
/* current can fail, but someone else can succeed. */ /* current can fail, but someone else can succeed. */
return READ_ONCE(*pkc); return READ_ONCE(*pkc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment