Print a warning when device_add_child returns NULL. This used to be
impossible at this point, but now it apparently is. Grump. Submitted by: OGAWA Takaya <t-ogawa@triaez.kaisei.org>
This commit is contained in:
parent
b2237d4d5c
commit
bcf8b176bb
@ -242,6 +242,11 @@ allocate_driver(struct slot *slt, struct dev_desc *desc)
|
||||
bcopy(desc->misc, devi->misc, sizeof(desc->misc));
|
||||
resource_list_init(&devi->resources);
|
||||
child = device_add_child(pccarddev, devi->name, desc->unit);
|
||||
if (child == NULL) {
|
||||
device_printf(pccardd,
|
||||
"device_add_child shouldn't have failed, but did\n"");
|
||||
return (EIO);
|
||||
}
|
||||
device_set_flags(child, desc->flags);
|
||||
device_set_ivars(child, devi);
|
||||
if (bootverbose) {
|
||||
|
Loading…
Reference in New Issue
Block a user