KVM: PPC: Book3S HV nestedv2: Fix an error handling path in gs_msg_ops_kvmhv_nestedv2...
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 28 Jan 2024 11:34:25 +0000 (12:34 +0100)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 7 May 2024 15:28:00 +0000 (01:28 +1000)
commitb52e8cd3f835869370f8540f1bc804a47a47f02b
treeacc348b68e61e5f227ae1d228237127cd967a38f
parent651d61bc8b7d8bb622cfc24be2ee92eebb4ed3cc
KVM: PPC: Book3S HV nestedv2: Fix an error handling path in gs_msg_ops_kvmhv_nestedv2_config_fill_info()

The return value of kvmppc_gse_put_buff_info() is not assigned to 'rc' and
'rc' is uninitialized at this point.
So the error handling can not work.

Assign the expected value to 'rc' to fix the issue.

Fixes: 19d31c5f1157 ("KVM: PPC: Add support for nestedv2 guests")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Vaibhav Jain <vaibhav@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/a7ed4cc12e0a0bbd97fac44fe6c222d1c393ec95.1706441651.git.christophe.jaillet@wanadoo.fr
arch/powerpc/kvm/book3s_hv_nestedv2.c