git: b25d7f747731 - main - Fix the style of bcm_pcib_msi_attach a little

From: Andrew Turner <andrew_at_FreeBSD.org>
Date: Mon, 23 May 2022 16:35:57 UTC
The branch main has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=b25d7f7477316d185277e4d29da220cc742f6802

commit b25d7f7477316d185277e4d29da220cc742f6802
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2022-05-23 16:33:53 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2022-05-23 16:33:53 +0000

    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
---
 sys/arm/broadcom/bcm2835/bcm2838_pci.c | 4 ++--
 1 file 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");