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 /sys/arm/at91/at91.c | |
parent | 198f18300e16e842f18b7bfea3e58033c90fd500 (diff) | |
download | FreeBSD-src-c96884d89bc68f56bf0346be9741d5ff50e65732.zip FreeBSD-src-c96884d89bc68f56bf0346be9741d5ff50e65732.tar.gz |
Check the return value of BUS_SETUP_INTR()
Reviewed by: imp
Diffstat (limited to 'sys/arm/at91/at91.c')
-rw-r--r-- | sys/arm/at91/at91.c | 8 |
1 files changed, 6 insertions, 2 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); |