1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-02-06 18:29:47 +00:00

Allow the attach routine to fail gracefully and not panic the system.

This commit is contained in:
Warner Losh 2009-03-26 17:36:19 +00:00
parent d2b2128a28
commit ba32f0ff83
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=190446

View File

@ -389,7 +389,8 @@ ed_detach(device_t dev)
callout_drain(&sc->tick_ch);
ether_ifdetach(ifp);
}
bus_teardown_intr(dev, sc->irq_res, sc->irq_handle);
if (sc->irq_res != NULL && sc->irq_handle)
bus_teardown_intr(dev, sc->irq_res, sc->irq_handle);
ed_release_resources(dev);
ED_LOCK_DESTROY(sc);
bus_generic_detach(dev);