KVM: PPC: e500mc: Fix a NULL dereference
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 13 Jul 2017 07:38:49 +0000 (10:38 +0300)
committerPaul Mackerras <paulus@ozlabs.org>
Thu, 31 Aug 2017 02:36:44 +0000 (12:36 +1000)
commit50a1a25987146c5ab15d6c1642a5043730ace0a5
treed29f5f801fdb0178fb1c3f741b6d718252b7729c
parent73e77c0982fd25ddb536339906412cbed78d0b79
KVM: PPC: e500mc: Fix a NULL dereference

We should set "err = -ENOMEM;", otherwise it means we're returning
ERR_PTR(0) which is NULL.  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/e500mc.c