Need to initialize the resource list that we keep for our children.

STAILQ's require this, while it is optional for SLIST (well, as long
as the memory is bzeroed).

Noticed by: phk's crash
This commit is contained in:
Warner Losh 2005-03-18 16:37:51 +00:00
parent af0b17b173
commit 3eafe746ab

View File

@ -256,6 +256,7 @@ pccard_attach_card(device_t dev)
*/
ivar = malloc(sizeof(struct pccard_ivar), M_DEVBUF,
M_WAITOK | M_ZERO);
resource_list_init(&ivar->resources);
child = device_add_child(dev, NULL, -1);
device_set_ivars(child, ivar);
ivar->fcn = pf;