diff options
author | Fabiano Rosas <farosas@linux.ibm.com> | 2022-01-25 16:57:32 +0100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2022-02-03 06:50:44 +0100 |
commit | 69ab6ac380a00244575de02c406dcb9491bf3368 (patch) | |
tree | a7ba9082b7571ba9bd0281f7bac6c38b66a7e353 /arch/powerpc/kvm/book3s_hv.c | |
parent | powerpc/kvm: no need to initialise statics to 0 (diff) | |
download | linux-69ab6ac380a00244575de02c406dcb9491bf3368.tar.xz linux-69ab6ac380a00244575de02c406dcb9491bf3368.zip |
KVM: PPC: Book3S HV: Check return value of kvmppc_radix_init
The return of the function is being shadowed by the call to
kvmppc_uvmem_init.
Fixes: ca9f4942670c ("KVM: PPC: Book3S HV: Support for running secure guests")
Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220125155735.1018683-2-farosas@linux.ibm.com
Diffstat (limited to 'arch/powerpc/kvm/book3s_hv.c')
-rw-r--r-- | arch/powerpc/kvm/book3s_hv.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index c7e44d75f8aa..98ec92cf837b 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c @@ -6130,8 +6130,11 @@ static int kvmppc_book3s_init_hv(void) if (r) return r; - if (kvmppc_radix_possible()) + if (kvmppc_radix_possible()) { r = kvmppc_radix_init(); + if (r) + return r; + } r = kvmppc_uvmem_init(); if (r < 0) |