diff options
author | n_hibma <n_hibma@FreeBSD.org> | 2000-01-26 10:27:12 +0000 |
---|---|---|
committer | n_hibma <n_hibma@FreeBSD.org> | 2000-01-26 10:27:12 +0000 |
commit | 64cda4e365ddb1be065912f0591b572d1af8aa08 (patch) | |
tree | 5675e9e42d1d17bdf10da353182b8da278d9948b /sys/pci/ohci_pci.c | |
parent | eb4463295ba6da7a5b6c1d94f38f7d52ef926c06 (diff) | |
download | FreeBSD-src-64cda4e365ddb1be065912f0591b572d1af8aa08.zip FreeBSD-src-64cda4e365ddb1be065912f0591b572d1af8aa08.tar.gz |
Don't set ivars until we checked the return value from device_add_child.
Diffstat (limited to 'sys/pci/ohci_pci.c')
-rw-r--r-- | sys/pci/ohci_pci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/pci/ohci_pci.c b/sys/pci/ohci_pci.c index 1f5f345..27fe020 100644 --- a/sys/pci/ohci_pci.c +++ b/sys/pci/ohci_pci.c @@ -174,11 +174,11 @@ ohci_pci_attach(device_t self) } usbus = device_add_child(self, "usb", -1); - device_set_ivars(usbus, sc); if (!usbus) { device_printf(self, "could not add USB device\n"); return ENOMEM; } + device_set_ivars(usbus, sc); switch (pci_get_devid(self)) { case PCI_OHCI_DEVICEID_ALADDIN_V: |