Skip to content

Commit ec76f40

Browse files
aikawilliam
authored andcommitted
vfio-pci: Add missing break to enable VFIO_PCI_ERR_IRQ_INDEX
This adds a missing break statement to VFIO_DEVICE_SET_IRQS handler without which vfio_pci_set_err_trigger() would never be called. While we are here, add another "break" to VFIO_PCI_REQ_IRQ_INDEX case so if we add more indexes later, we won't miss it. Fixes: 6140a8f ("vfio-pci: Add device request interface") Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
1 parent 9eccca0 commit ec76f40

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/vfio/pci/vfio_pci_intrs.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -868,12 +868,14 @@ int vfio_pci_set_irqs_ioctl(struct vfio_pci_device *vdev, uint32_t flags,
868868
func = vfio_pci_set_err_trigger;
869869
break;
870870
}
871+
break;
871872
case VFIO_PCI_REQ_IRQ_INDEX:
872873
switch (flags & VFIO_IRQ_SET_ACTION_TYPE_MASK) {
873874
case VFIO_IRQ_SET_ACTION_TRIGGER:
874875
func = vfio_pci_set_req_trigger;
875876
break;
876877
}
878+
break;
877879
}
878880

879881
if (!func)

0 commit comments

Comments
 (0)