By the same logic as commit 5caa2d89b7f1 ("kernel/nsproxy: remove
unnecessary guards"), remove the guard around put_pid_ns() in
validate_nsset() as put_pid_ns() already performs the NULL check.
Signed-off-by: Joel Savitz <jsavitz@redhat.com>
---
kernel/nsproxy.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c
index 5f31fdff8a38..be89e006e6aa 100644
--- a/kernel/nsproxy.c
+++ b/kernel/nsproxy.c
@@ -481,8 +481,7 @@ static int validate_nsset(struct nsset *nsset, struct pid *pid)
#endif
out:
- if (pid_ns)
- put_pid_ns(pid_ns);
+ put_pid_ns(pid_ns);
if (nsp)
put_nsproxy(nsp);
put_user_ns(user_ns);
--
2.45.2