linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] userns: Remove redundant assignment to variable ret
@ 2020-09-21  6:37 Jing Xiangfeng
  0 siblings, 0 replies; only message in thread
From: Jing Xiangfeng @ 2020-09-21  6:37 UTC (permalink / raw)
  To: christian.brauner, serge; +Cc: linux-kernel, jingxiangfeng

After commit d2f007dbe7e4 ("userns: also map extents in the reverse map
to kernel IDs"), the assignment to ret is redundant. So remove it.

Signed-off-by: Jing Xiangfeng <jingxiangfeng@huawei.com>
---
 kernel/user_namespace.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c
index 87804e0371fe..0157ae92e447 100644
--- a/kernel/user_namespace.c
+++ b/kernel/user_namespace.c
@@ -968,7 +968,6 @@ static ssize_t map_write(struct file *file, const char __user *buf,
 	if (!new_idmap_permitted(file, ns, cap_setid, &new_map))
 		goto out;
 
-	ret = -EPERM;
 	/* Map the lower ids from the parent user namespace to the
 	 * kernel global id space.
 	 */
-- 
2.17.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-09-21  6:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-21  6:37 [PATCH] userns: Remove redundant assignment to variable ret Jing Xiangfeng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).