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
This commit is contained in:
Andrew Turner 2022-05-23 17:33:53 +01:00
parent ad52fba11e
commit b25d7f7477

View File

@ -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");