summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Fritsch <sf@cvs.openbsd.org>2024-09-19 06:19:06 +0000
committerStefan Fritsch <sf@cvs.openbsd.org>2024-09-19 06:19:06 +0000
commit2f0d1c29558a69a9ca9d46d5243428fbc86650e8 (patch)
treee6a644417ba64bcfc545a4f29f79c8e1c2594ec2
parentcc99136753f65b3efec52120e7c2ea12bbaf1f6a (diff)
virtio_pci: Fix off-by-one in interrupt setup
This was introduced by "virtio: Move interrupt setup into separate function". ok jan@
-rw-r--r--sys/dev/pci/virtio_pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/virtio_pci.c b/sys/dev/pci/virtio_pci.c
index 4a0c9037cf7..f9c8801ceb7 100644
--- a/sys/dev/pci/virtio_pci.c
+++ b/sys/dev/pci/virtio_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: virtio_pci.c,v 1.42 2024/09/02 08:26:26 sf Exp $ */
+/* $OpenBSD: virtio_pci.c,v 1.43 2024/09/19 06:19:05 sf Exp $ */
/* $NetBSD: virtio.c,v 1.3 2011/11/02 23:05:52 njoly Exp $ */
/*
@@ -284,7 +284,7 @@ virtio_pci_setup_intrs(struct virtio_softc *vsc)
if (sc->sc_irq_type == IRQ_NO_MSIX)
return;
- for (i = 0; i <= vsc->sc_nvqs; i++) {
+ for (i = 0; i < vsc->sc_nvqs; i++) {
unsigned vec = vsc->sc_vqs[i].vq_intr_vec;
virtio_pci_set_msix_queue_vector(sc, i, vec);
}