From: Pavel Emelyanov The function in question returns ERR_PTR-s to indicate the error, while the caller checks for return value to be NULL. Found during testing the OpenVZ kernel with pid namespaces. Signed-off-by: Pavel Emelyanov Signed-off-by: Alexey Dobriyan Cc: Sukadev Bhattiprolu Cc: Oleg Nesterov Signed-off-by: Andrew Morton --- kernel/pid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN kernel/pid.c~pid-namespaces-allow-cloning-of-new-namespace-fix-check-for-return-value-of-create_pid_namespace kernel/pid.c --- a/kernel/pid.c~pid-namespaces-allow-cloning-of-new-namespace-fix-check-for-return-value-of-create_pid_namespace +++ a/kernel/pid.c @@ -544,7 +544,7 @@ struct pid_namespace *copy_pid_ns(unsign goto out_put; new_ns = create_pid_namespace(old_ns->level + 1); - if (new_ns != NULL) + if (!IS_ERR(new_ns)) new_ns->parent = get_pid_ns(old_ns); out_put: _