KVM: PPC: e500: Fix some NULL dereferences on error

There are some error paths in kvmppc_core_vcpu_create_e500() where we
forget to set the error code.  It means that we return ERR_PTR(0) which
is NULL and it results in a NULL pointer dereference in the caller.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
This commit is contained in:
Dan Carpenter 2017-07-13 10:38:29 +03:00 • committed by Paul Mackerras
commit 73e77c0982