aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--virt/kvm/assigned-dev.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/virt/kvm/assigned-dev.c b/virt/kvm/assigned-dev.c
index d3892076f93c..ae72ae604c89 100644
--- a/virt/kvm/assigned-dev.c
+++ b/virt/kvm/assigned-dev.c
@@ -674,7 +674,7 @@ long kvm_vm_ioctl_assigned_device(struct kvm *kvm, unsigned ioctl,
674 unsigned long arg) 674 unsigned long arg)
675{ 675{
676 void __user *argp = (void __user *)arg; 676 void __user *argp = (void __user *)arg;
677 int r = -ENOTTY; 677 int r;
678 678
679 switch (ioctl) { 679 switch (ioctl) {
680 case KVM_ASSIGN_PCI_DEVICE: { 680 case KVM_ASSIGN_PCI_DEVICE: {
@@ -692,7 +692,6 @@ long kvm_vm_ioctl_assigned_device(struct kvm *kvm, unsigned ioctl,
692 r = -EOPNOTSUPP; 692 r = -EOPNOTSUPP;
693 break; 693 break;
694 } 694 }
695#ifdef KVM_CAP_ASSIGN_DEV_IRQ
696 case KVM_ASSIGN_DEV_IRQ: { 695 case KVM_ASSIGN_DEV_IRQ: {
697 struct kvm_assigned_irq assigned_irq; 696 struct kvm_assigned_irq assigned_irq;
698 697
@@ -715,8 +714,6 @@ long kvm_vm_ioctl_assigned_device(struct kvm *kvm, unsigned ioctl,
715 goto out; 714 goto out;
716 break; 715 break;
717 } 716 }
718#endif
719#ifdef KVM_CAP_DEVICE_DEASSIGNMENT
720 case KVM_DEASSIGN_PCI_DEVICE: { 717 case KVM_DEASSIGN_PCI_DEVICE: {
721 struct kvm_assigned_pci_dev assigned_dev; 718 struct kvm_assigned_pci_dev assigned_dev;
722 719
@@ -728,7 +725,6 @@ long kvm_vm_ioctl_assigned_device(struct kvm *kvm, unsigned ioctl,
728 goto out; 725 goto out;
729 break; 726 break;
730 } 727 }
731#endif
732#ifdef KVM_CAP_IRQ_ROUTING 728#ifdef KVM_CAP_IRQ_ROUTING
733 case KVM_SET_GSI_ROUTING: { 729 case KVM_SET_GSI_ROUTING: {
734 struct kvm_irq_routing routing; 730 struct kvm_irq_routing routing;
@@ -781,6 +777,9 @@ long kvm_vm_ioctl_assigned_device(struct kvm *kvm, unsigned ioctl,
781 break; 777 break;
782 } 778 }
783#endif 779#endif
780 default:
781 r = -ENOTTY;
782 break;
784 } 783 }
785out: 784out:
786 return r; 785 return r;