diff options
author | kevlo <kevlo@FreeBSD.org> | 2011-10-27 10:21:40 +0000 |
---|---|---|
committer | kevlo <kevlo@FreeBSD.org> | 2011-10-27 10:21:40 +0000 |
commit | c96884d89bc68f56bf0346be9741d5ff50e65732 (patch) | |
tree | f5e9e38eaac1e53f6b4652053e07776e2fafc78b | |
parent | 198f18300e16e842f18b7bfea3e58033c90fd500 (diff) | |
download | FreeBSD-src-c96884d89bc68f56bf0346be9741d5ff50e65732.zip FreeBSD-src-c96884d89bc68f56bf0346be9741d5ff50e65732.tar.gz |
Check the return value of BUS_SETUP_INTR()
Reviewed by: imp
-rw-r--r-- | sys/arm/at91/at91.c | 8 | ||||
-rw-r--r-- | sys/arm/econa/econa.c | 7 | ||||
-rw-r--r-- | sys/arm/xscale/i80321/iq80321.c | 8 | ||||
-rw-r--r-- | sys/arm/xscale/i8134x/i81342.c | 8 | ||||
-rw-r--r-- | sys/arm/xscale/ixp425/ixp425.c | 7 | ||||
-rw-r--r-- | sys/arm/xscale/pxa/pxa_obio.c | 7 |
6 files changed, 32 insertions, 13 deletions
diff --git a/sys/arm/at91/at91.c b/sys/arm/at91/at91.c index e979dcb..3d55fd3 100644 --- a/sys/arm/at91/at91.c +++ b/sys/arm/at91/at91.c @@ -367,11 +367,15 @@ at91_setup_intr(device_t dev, device_t child, driver_intr_t *intr, void *arg, void **cookiep) { struct at91_softc *sc = device_get_softc(dev); + int error; if (rman_get_start(ires) == sc->sc_irq_system && filt == NULL) panic("All system interrupt ISRs must be FILTER"); - BUS_SETUP_INTR(device_get_parent(dev), child, ires, flags, filt, - intr, arg, cookiep); + error = BUS_SETUP_INTR(device_get_parent(dev), child, ires, flags, + filt, intr, arg, cookiep); + if (error) + return (error); + bus_space_write_4(sc->sc_st, sc->sc_aic_sh, IC_IECR, 1 << rman_get_start(ires)); return (0); diff --git a/sys/arm/econa/econa.c b/sys/arm/econa/econa.c index eb6d04e..f96dfc3 100644 --- a/sys/arm/econa/econa.c +++ b/sys/arm/econa/econa.c @@ -592,12 +592,15 @@ econa_setup_intr(device_t dev, device_t child, struct resource *ires, int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep) { + int error; if (rman_get_start(ires) == ECONA_IRQ_SYSTEM && filt == NULL) panic("All system interrupt ISRs must be FILTER"); - BUS_SETUP_INTR(device_get_parent(dev), child, ires, flags, filt, - intr, arg, cookiep); + error = BUS_SETUP_INTR(device_get_parent(dev), child, ires, flags, + filt, intr, arg, cookiep); + if (error) + return (error); arm_unmask_irq(rman_get_start(ires)); diff --git a/sys/arm/xscale/i80321/iq80321.c b/sys/arm/xscale/i80321/iq80321.c index 04ef8b9..7a875bf 100644 --- a/sys/arm/xscale/i80321/iq80321.c +++ b/sys/arm/xscale/i80321/iq80321.c @@ -354,8 +354,12 @@ iq80321_setup_intr(device_t dev, device_t child, struct resource *ires, int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep) { - BUS_SETUP_INTR(device_get_parent(dev), child, ires, flags, filt, intr, - arg, cookiep); + int error; + + error = BUS_SETUP_INTR(device_get_parent(dev), child, ires, flags, + filt, intr, arg, cookiep); + if (error) + return (error); intr_enabled |= 1 << rman_get_start(ires); i80321_set_intrmask(); diff --git a/sys/arm/xscale/i8134x/i81342.c b/sys/arm/xscale/i8134x/i81342.c index 2d8783e..44ec3fd 100644 --- a/sys/arm/xscale/i8134x/i81342.c +++ b/sys/arm/xscale/i8134x/i81342.c @@ -429,10 +429,12 @@ i81342_setup_intr(device_t dev, device_t child, struct resource *ires, int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep) { - + int error; - BUS_SETUP_INTR(device_get_parent(dev), child, ires, flags, filt, intr, - arg, cookiep); + error = BUS_SETUP_INTR(device_get_parent(dev), child, ires, flags, + filt, intr, arg, cookiep); + if (error) + return (error); arm_unmask_irq(rman_get_start(ires)); return (0); } diff --git a/sys/arm/xscale/ixp425/ixp425.c b/sys/arm/xscale/ixp425/ixp425.c index 78d2042..1b56642 100644 --- a/sys/arm/xscale/ixp425/ixp425.c +++ b/sys/arm/xscale/ixp425/ixp425.c @@ -639,9 +639,12 @@ ixp425_setup_intr(device_t dev, device_t child, driver_intr_t *intr, void *arg, void **cookiep) { uint32_t mask, mask2; + int error; - BUS_SETUP_INTR(device_get_parent(dev), child, res, flags, filt, intr, - arg, cookiep); + error = BUS_SETUP_INTR(device_get_parent(dev), child, res, flags, + filt, intr, arg, cookiep); + if (error) + return (error); get_masks(res, &mask, &mask2); update_masks(intr_enabled | mask, intr_enabled2 | mask2); diff --git a/sys/arm/xscale/pxa/pxa_obio.c b/sys/arm/xscale/pxa/pxa_obio.c index e2f8166..0f7e4a6 100644 --- a/sys/arm/xscale/pxa/pxa_obio.c +++ b/sys/arm/xscale/pxa/pxa_obio.c @@ -173,11 +173,14 @@ pxa_setup_intr(device_t dev, device_t child, struct resource *irq, int flags, driver_filter_t *filter, driver_intr_t *ithread, void *arg, void **cookiep) { struct obio_softc *sc; + int error; sc = (struct obio_softc *)device_get_softc(dev); - BUS_SETUP_INTR(device_get_parent(dev), child, irq, flags, filter, - ithread, arg, cookiep); + error = BUS_SETUP_INTR(device_get_parent(dev), child, irq, flags, + filter, ithread, arg, cookiep); + if (error) + return (error); arm_unmask_irq(rman_get_start(irq)); return (0); } |