make code less broken, only try to create unit 0 since there can only

be one, this will help prevent multipling devices if this driver is
ever loaded/unloaded multiple times...

Prodded by:	julian
This commit is contained in:
John-Mark Gurney 2004-06-13 05:00:19 +00:00
parent 8559e0a291
commit 0ddcf11c52
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=130402

View file

@ -247,8 +247,10 @@ ichwd_identify(driver_t *driver, device_t parent)
/* good, add child to bus */
if ((dev = device_find_child(parent, driver->name, 0)) == NULL)
dev = BUS_ADD_CHILD(parent, 0, driver->name, -1);
device_set_desc_copy(dev, id->desc);
dev = BUS_ADD_CHILD(parent, 0, driver->name, 0);
if (dev != NULL)
device_set_desc_copy(dev, id->desc);
}
static int