KVM: PPC: e500: Fix some NULL dereferences on error
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 13 Jul 2017 07:38:29 +0000 (10:38 +0300)
committerPaul Mackerras <paulus@ozlabs.org>
Thu, 31 Aug 2017 02:36:44 +0000 (12:36 +1000)
commit73e77c0982fd25ddb536339906412cbed78d0b79
tree47d28bea0d2da98c286e13486747cf64dd137044
parent712b12d72451411c40e39d25e2140fb8c7fd0e49
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>
arch/powerpc/kvm/e500.c