[PATCH 1/3] KVM: PPC: Book3S HV: Check return value of kvmppc_radix_init

Nicholas Piggin npiggin at gmail.com
Sat Dec 25 21:17:16 AEDT 2021


Excerpts from Fabiano Rosas's message of December 24, 2021 7:19 am:
> The return of the function is being shadowed by the call to
> kvmppc_uvmem_init.
> 

Reviewed-by: Nicholas Piggin <npiggin at gmail.com>

> Fixes: ca9f4942670c ("KVM: PPC: Book3S HV: Support for running secure guests")
> Signed-off-by: Fabiano Rosas <farosas at linux.ibm.com>
> ---
>  arch/powerpc/kvm/book3s_hv.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
> index 7b74fc0a986b..9f4765951733 100644
> --- a/arch/powerpc/kvm/book3s_hv.c
> +++ b/arch/powerpc/kvm/book3s_hv.c
> @@ -6098,8 +6098,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)
> -- 
> 2.33.1
> 
> 


More information about the Linuxppc-dev mailing list