summaryrefslogtreecommitdiffstats
path: root/arch/s390/kvm/kvm-s390.c
diff options
context:
space:
mode:
authorNicholas Krause2015-08-06 19:05:54 +0200
committerChristian Borntraeger2015-08-07 12:15:23 +0200
commit152b28392a8d9dd08e789b48b602eb75eef436fa (patch)
treeb554a0a76e747de082ebbde52989929044388404 /arch/s390/kvm/kvm-s390.c
parentKVM: s390: host STP toleration for VMs (diff)
downloadkernel-qcow2-linux-152b28392a8d9dd08e789b48b602eb75eef436fa.tar.gz
kernel-qcow2-linux-152b28392a8d9dd08e789b48b602eb75eef436fa.tar.xz
kernel-qcow2-linux-152b28392a8d9dd08e789b48b602eb75eef436fa.zip
KVM: s390: Fix assumption that kvm_set_irq_routing is always run successfully
This fixes the assumption that kvm_set_irq_routing is always run successfully by instead making it equal to the variable r which we use for returning in the function kvm_arch_vm_ioctl instead of making r equal to zero when calling this particular function and incorrectly making the caller of kvm_arch_vm_ioctl think the function has run successfully. Signed-off-by: Nicholas Krause <xerofoify@gmail.com> Message-Id: <1438880754-27149-1-git-send-email-xerofoify@gmail.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'arch/s390/kvm/kvm-s390.c')
-rw-r--r--arch/s390/kvm/kvm-s390.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index 4bdb860b5c49..397b88dc1b2c 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -962,8 +962,7 @@ long kvm_arch_vm_ioctl(struct file *filp,
if (kvm->arch.use_irqchip) {
/* Set up dummy routing. */
memset(&routing, 0, sizeof(routing));
- kvm_set_irq_routing(kvm, &routing, 0, 0);
- r = 0;
+ r = kvm_set_irq_routing(kvm, &routing, 0, 0);
}
break;
}