diff --git a/kernel/cred.c b/kernel/cred.c index 098213d4a39c3de3636fa1e0cef0ba82484e14f1..58a8a9e24347d4202a96a412e17ce2288db5c273 100644 --- a/kernel/cred.c +++ b/kernel/cred.c @@ -372,8 +372,7 @@ int copy_creds(struct task_struct *p, unsigned long clone_flags) ret = create_user_ns(new); if (ret < 0) goto error_put; - ret = set_cred_ucounts(new); - if (ret < 0) + if (set_cred_ucounts(new) < 0) goto error_put; }