From e2ae5821fe7078094b2fb5538d6f2b31fcb4fa5f Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Sat, 24 Feb 2007 15:56:06 +0000 Subject: [PATCH] exca->pccarddev should always be non-null now. Only call it when the device is actually attached. --- sys/dev/exca/exca.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/exca/exca.c b/sys/dev/exca/exca.c index a46ba4763c0..a7ff95668bd 100644 --- a/sys/dev/exca/exca.c +++ b/sys/dev/exca/exca.c @@ -766,7 +766,7 @@ exca_probe_slots(device_t dev, struct exca_softc *exca, bus_space_tag_t iot, void exca_insert(struct exca_softc *exca) { - if (exca->pccarddev != NULL) { + if (device_is_attached(exca->pccarddev)) { if (CARD_ATTACH_CARD(exca->pccarddev) != 0) device_printf(exca->dev, "PC Card card activation failed\n");