From 2a6c850c09ef7ae2a70015591e78e38eff364e4c Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Fri, 21 May 2004 06:11:47 +0000 Subject: [PATCH] When attaching pccard and cardbus children, there's no need to set the device == NULL on failure. A warning should suffice. # I wrote this back before I understood the unattached but loosely bound # newbus concept... --- sys/dev/pccbb/pccbb.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sys/dev/pccbb/pccbb.c b/sys/dev/pccbb/pccbb.c index b935b5f7607..b942ce88b1f 100644 --- a/sys/dev/pccbb/pccbb.c +++ b/sys/dev/pccbb/pccbb.c @@ -757,18 +757,14 @@ cbb_attach(device_t brdev) sc->cbdev = device_add_child(brdev, "cardbus", -1); if (sc->cbdev == NULL) DEVPRINTF((brdev, "WARNING: cannot add cardbus bus.\n")); - else if (device_probe_and_attach(sc->cbdev) != 0) { + else if (device_probe_and_attach(sc->cbdev) != 0) DEVPRINTF((brdev, "WARNING: cannot attach cardbus bus!\n")); - sc->cbdev = NULL; - } sc->exca.pccarddev = device_add_child(brdev, "pccard", -1); if (sc->exca.pccarddev == NULL) DEVPRINTF((brdev, "WARNING: cannot add pccard bus.\n")); - else if (device_probe_and_attach(sc->exca.pccarddev) != 0) { + else if (device_probe_and_attach(sc->exca.pccarddev) != 0) DEVPRINTF((brdev, "WARNING: cannot attach pccard bus.\n")); - sc->exca.pccarddev = NULL; - } /* Map and establish the interrupt. */ rid = 0;