KVM: s390: propagate error from enable storage key

As enabling storage keys might fail, we should forward the error.

Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
This commit is contained in:
Dominik Dingel 2015-05-07 15:16:13 +02:00 committed by Christian Borntraeger
parent 5492830370
commit 14d4a425e7
1 changed files with 3 additions and 1 deletions

View File

@ -821,7 +821,9 @@ static long kvm_s390_set_skeys(struct kvm *kvm, struct kvm_s390_skeys *args)
}
/* Enable storage key handling for the guest */
s390_enable_skey();
r = s390_enable_skey();
if (r)
goto out;
for (i = 0; i < args->count; i++) {
hva = gfn_to_hva(kvm, args->start_gfn + i);