From db0a62f9cc7f3a7940fa4e97d0d864f5f83da528 Mon Sep 17 00:00:00 2001 From: jhb Date: Mon, 31 Mar 2003 19:24:37 +0000 Subject: If we fail to find our PCI ID in attach (this should never happen), then just return ENXIO directly instead of calling tl_detach() since that would panic since the softc mutex isn't initialized until after this check. --- sys/pci/if_tl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sys/pci') diff --git a/sys/pci/if_tl.c b/sys/pci/if_tl.c index 509e3f8..1b8bf7b 100644 --- a/sys/pci/if_tl.c +++ b/sys/pci/if_tl.c @@ -1137,8 +1137,7 @@ tl_attach(dev) if (t->tl_name == NULL) { device_printf(dev, "unknown device!?\n"); - error = ENXIO; - goto fail; + return (ENXIO); } mtx_init(&sc->tl_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, -- cgit v1.1