diff options
author | jlemon <jlemon@FreeBSD.org> | 2000-04-07 00:09:24 +0000 |
---|---|---|
committer | jlemon <jlemon@FreeBSD.org> | 2000-04-07 00:09:24 +0000 |
commit | e1128bd07d48d6e5290924e7436cee2c89c7bb06 (patch) | |
tree | ad03dc0c41669c26c9e7c58db556c50f91f8323d /sys/dev/ppbus | |
parent | 1e7296fbf752144c78ff5c572b27eb0ff297eb17 (diff) | |
download | FreeBSD-src-e1128bd07d48d6e5290924e7436cee2c89c7bb06.zip FreeBSD-src-e1128bd07d48d6e5290924e7436cee2c89c7bb06.tar.gz |
If we can't allocate an IRQ resource, fail in the attach routine.
Diffstat (limited to 'sys/dev/ppbus')
-rw-r--r-- | sys/dev/ppbus/ppi.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/ppbus/ppi.c b/sys/dev/ppbus/ppi.c index 2015fce..971d317 100644 --- a/sys/dev/ppbus/ppi.c +++ b/sys/dev/ppbus/ppi.c @@ -173,6 +173,10 @@ ppi_attach(device_t dev) /* declare our interrupt handler */ ppi->intr_resource = bus_alloc_resource(dev, SYS_RES_IRQ, &zero, irq, irq, 1, RF_ACTIVE); + if (ppi->intr_resource == NULL) { + device_printf(dev, "can't allocate irq\n"); + return (ENOMEM); + } make_dev(&ppi_cdevsw, device_get_unit(dev), /* XXX cleanup */ UID_ROOT, GID_WHEEL, |