diff options
author | marcel <marcel@FreeBSD.org> | 2005-01-09 18:58:08 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2005-01-09 18:58:08 +0000 |
commit | 85df1dc56505a7795786ceda06703fcc703c86c0 (patch) | |
tree | 664ce8a0381370e613a87682d77a946ac33c62f7 /sys/sparc64/ebus | |
parent | e859ec7af6e51d3c006599954d285db1e6386f33 (diff) | |
download | FreeBSD-src-85df1dc56505a7795786ceda06703fcc703c86c0.zip FreeBSD-src-85df1dc56505a7795786ceda06703fcc703c86c0.tar.gz |
Don't panic when we're asked to allocate a resource type that we know
won't exist for EBus. Just fail the allocation by returning NULL.
Now drivers that are MI can try resources that the driver knows may
be used by the device.
Diffstat (limited to 'sys/sparc64/ebus')
-rw-r--r-- | sys/sparc64/ebus/ebus.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/sparc64/ebus/ebus.c b/sys/sparc64/ebus/ebus.c index fa1c1da..410ed6d 100644 --- a/sys/sparc64/ebus/ebus.c +++ b/sys/sparc64/ebus/ebus.c @@ -353,10 +353,9 @@ ebus_alloc_resource(device_t bus, device_t child, int type, int *rid, case SYS_RES_IRQ: return (resource_list_alloc(rl, bus, child, type, rid, start, end, count, flags)); - default: - panic("ebus_alloc_resource: unsupported resource type %d", - type); } + + return (NULL); } int |