Author: kevlo Date: Thu Oct 27 10:21:40 2011 New Revision: 226832 URL: http://svn.freebsd.org/changeset/base/226832
Log: Check the return value of BUS_SETUP_INTR() Reviewed by: imp Modified: head/sys/arm/at91/at91.c head/sys/arm/econa/econa.c head/sys/arm/xscale/i80321/iq80321.c head/sys/arm/xscale/i8134x/i81342.c head/sys/arm/xscale/ixp425/ixp425.c head/sys/arm/xscale/pxa/pxa_obio.c Modified: head/sys/arm/at91/at91.c ============================================================================== --- head/sys/arm/at91/at91.c Thu Oct 27 09:47:00 2011 (r226831) +++ head/sys/arm/at91/at91.c Thu Oct 27 10:21:40 2011 (r226832) @@ -367,11 +367,15 @@ at91_setup_intr(device_t dev, device_t c 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); Modified: head/sys/arm/econa/econa.c ============================================================================== --- head/sys/arm/econa/econa.c Thu Oct 27 09:47:00 2011 (r226831) +++ head/sys/arm/econa/econa.c Thu Oct 27 10:21:40 2011 (r226832) @@ -592,12 +592,15 @@ econa_setup_intr(device_t dev, device_t 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)); Modified: head/sys/arm/xscale/i80321/iq80321.c ============================================================================== --- head/sys/arm/xscale/i80321/iq80321.c Thu Oct 27 09:47:00 2011 (r226831) +++ head/sys/arm/xscale/i80321/iq80321.c Thu Oct 27 10:21:40 2011 (r226832) @@ -354,8 +354,12 @@ iq80321_setup_intr(device_t dev, device_ 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(); Modified: head/sys/arm/xscale/i8134x/i81342.c ============================================================================== --- head/sys/arm/xscale/i8134x/i81342.c Thu Oct 27 09:47:00 2011 (r226831) +++ head/sys/arm/xscale/i8134x/i81342.c Thu Oct 27 10:21:40 2011 (r226832) @@ -429,10 +429,12 @@ i81342_setup_intr(device_t dev, device_t 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); } Modified: head/sys/arm/xscale/ixp425/ixp425.c ============================================================================== --- head/sys/arm/xscale/ixp425/ixp425.c Thu Oct 27 09:47:00 2011 (r226831) +++ head/sys/arm/xscale/ixp425/ixp425.c Thu Oct 27 10:21:40 2011 (r226832) @@ -639,9 +639,12 @@ ixp425_setup_intr(device_t dev, device_t 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); Modified: head/sys/arm/xscale/pxa/pxa_obio.c ============================================================================== --- head/sys/arm/xscale/pxa/pxa_obio.c Thu Oct 27 09:47:00 2011 (r226831) +++ head/sys/arm/xscale/pxa/pxa_obio.c Thu Oct 27 10:21:40 2011 (r226832) @@ -173,11 +173,14 @@ pxa_setup_intr(device_t dev, device_t ch 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); } _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"