diff options
author | jhb <jhb@FreeBSD.org> | 2003-03-31 19:24:37 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2003-03-31 19:24:37 +0000 |
commit | db0a62f9cc7f3a7940fa4e97d0d864f5f83da528 (patch) | |
tree | ccbfc9ff2705f4d5088b345ffcff2c1f4f1607cd /sys/pci/if_tl.c | |
parent | 574223ef321bcd88953aec62abc49c44dcdbd349 (diff) | |
download | FreeBSD-src-db0a62f9cc7f3a7940fa4e97d0d864f5f83da528.zip FreeBSD-src-db0a62f9cc7f3a7940fa4e97d0d864f5f83da528.tar.gz |
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.
Diffstat (limited to 'sys/pci/if_tl.c')
-rw-r--r-- | sys/pci/if_tl.c | 3 |
1 files changed, 1 insertions, 2 deletions
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, |