summaryrefslogtreecommitdiffstats
path: root/sys/sparc64/ebus/ebus.c
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2005-01-09 18:58:08 +0000
committermarcel <marcel@FreeBSD.org>2005-01-09 18:58:08 +0000
commit85df1dc56505a7795786ceda06703fcc703c86c0 (patch)
tree664ce8a0381370e613a87682d77a946ac33c62f7 /sys/sparc64/ebus/ebus.c
parente859ec7af6e51d3c006599954d285db1e6386f33 (diff)
downloadFreeBSD-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/ebus.c')
-rw-r--r--sys/sparc64/ebus/ebus.c5
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
OpenPOWER on IntegriCloud