diff options
author | Andrew Turner <andrew@FreeBSD.org> | 2022-05-23 16:33:53 +0000 |
---|---|---|
committer | Andrew Turner <andrew@FreeBSD.org> | 2022-05-23 16:33:53 +0000 |
commit | b25d7f7477316d185277e4d29da220cc742f6802 (patch) | |
tree | 1a97ad1660636ebc1b319f3aebda98b77f6a9ae5 /sys/arm | |
parent | ad52fba11e482949afa687e455d3e6f698f8d584 (diff) | |
download | src-b25d7f7477316d185277e4d29da220cc742f6802.tar.gz src-b25d7f7477316d185277e4d29da220cc742f6802.zip |
Fix the style of bcm_pcib_msi_attach a little
Move the definition of error to the top of the function.
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sys/arm')
-rw-r--r-- | sys/arm/broadcom/bcm2835/bcm2838_pci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arm/broadcom/bcm2835/bcm2838_pci.c b/sys/arm/broadcom/bcm2835/bcm2838_pci.c index 8511b2ea5fe2..7c5fd8d787b6 100644 --- a/sys/arm/broadcom/bcm2835/bcm2838_pci.c +++ b/sys/arm/broadcom/bcm2835/bcm2838_pci.c @@ -513,7 +513,7 @@ bcm_pcib_msi_attach(device_t dev) struct bcm_pcib_softc *sc; phandle_t node, xref; char const *bcm_name; - int i, rid; + int error, i, rid; sc = device_get_softc(dev); sc->msi_addr = 0xffffffffc; @@ -532,7 +532,7 @@ bcm_pcib_msi_attach(device_t dev) sc->msi_isrcs = malloc(sizeof(*sc->msi_isrcs) * NUM_MSI, M_DEVBUF, M_WAITOK | M_ZERO); - int error = bus_setup_intr(dev, sc->msi_irq_res, INTR_TYPE_BIO | + error = bus_setup_intr(dev, sc->msi_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, bcm_pcib_msi_intr, NULL, sc, &sc->msi_intr_cookie); if (error) { device_printf(dev, "error: failed to setup MSI handler.\n"); |