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.
This commit is contained in:
marcel 2005-01-09 18:58:08 +00:00
parent e859ec7af6
commit 85df1dc565

View File

@ -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