]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: s390: Return failure in case of failure in kvm_s390_set_cmma_bits()
authorClaudio Imbrenda <imbrenda@linux.ibm.com>
Tue, 23 Jun 2026 15:33:30 +0000 (17:33 +0200)
committerClaudio Imbrenda <imbrenda@linux.ibm.com>
Wed, 24 Jun 2026 08:08:57 +0000 (10:08 +0200)
commitbabe08404e1993697a523e60bc0f9d096ffe1ef8
tree1e52ba5a8e3f534b47ae215b6a6a213779529195
parent125a3d3fac51571b8ede0d0599618c6ecd975ea8
KVM: s390: Return failure in case of failure in kvm_s390_set_cmma_bits()

If the allocation of the bits array failed, kvm_s390_set_cmma_bits()
would return 0 instead of an error code.

Rework the function to use the __free() macros and thus simplify the
code flow; when the above mentioned allocation fails, simply return
-ENOMEM.

Fixes: e38c884df921 ("KVM: s390: Switch to new gmap")
Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Message-ID: <20260623153331.233784-10-imbrenda@linux.ibm.com>
arch/s390/kvm/kvm-s390.c