]> git.baikalelectronics.ru Git - kernel.git/commit
kernel/user.c: clean up some leftover code
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Tue, 14 May 2019 22:42:37 +0000 (15:42 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 15 May 2019 02:52:49 +0000 (19:52 -0700)
commit4de96a38cc8c3d59e833d6d71138429755d046a1
tree6e3ac0f2620159d6fdc1d117400b71bf16b11659
parent23ebe6f982c832a28597e872a1755c25c56553f4
kernel/user.c: clean up some leftover code

The out_unlock label is misleading; no unlocking happens after it, so
just return NULL directly.

Also, nothing between the kmem_cache_zalloc() that creates new and the
two key_put() can initialize new->uid_keyring or new->session_keyring,
so those calls are no-ops.

Link: http://lkml.kernel.org/r/20190424200404.9114-1-linux@rasmusvillemoes.dk
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: "Peter Zijlstra (Intel)" <peterz@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/user.c