svn commit: r190446 - head/sys/dev/ed
Warner Losh
imp at FreeBSD.org
Thu Mar 26 10:36:21 PDT 2009
Author: imp
Date: Thu Mar 26 17:36:19 2009
New Revision: 190446
URL: http://svn.freebsd.org/changeset/base/190446
Log:
Allow the attach routine to fail gracefully and not panic the system.
Modified:
head/sys/dev/ed/if_ed.c
Modified: head/sys/dev/ed/if_ed.c
==============================================================================
--- head/sys/dev/ed/if_ed.c Thu Mar 26 17:14:22 2009 (r190445)
+++ head/sys/dev/ed/if_ed.c Thu Mar 26 17:36:19 2009 (r190446)
@@ -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);
More information about the svn-src-all
mailing list