svn commit: r244751 - projects/altix2/sys/dev/bge

Marcel Moolenaar marcel at FreeBSD.org
Thu Dec 27 21:14:30 UTC 2012


Author: marcel
Date: Thu Dec 27 21:14:29 2012
New Revision: 244751
URL: http://svnweb.freebsd.org/changeset/base/244751

Log:
  Fix error handling when bge_detach() is called from bge_attach()
  and in particular due to DMA setup errors.

Modified:
  projects/altix2/sys/dev/bge/if_bge.c

Modified: projects/altix2/sys/dev/bge/if_bge.c
==============================================================================
--- projects/altix2/sys/dev/bge/if_bge.c	Thu Dec 27 20:59:22 2012	(r244750)
+++ projects/altix2/sys/dev/bge/if_bge.c	Thu Dec 27 21:14:29 2012	(r244751)
@@ -3901,7 +3901,7 @@ bge_detach(device_t dev)
 
 	if (sc->bge_flags & BGE_FLAG_TBI) {
 		ifmedia_removeall(&sc->bge_ifmedia);
-	} else {
+	} else if (sc->bge_miibus != NULL) {
 		bus_generic_detach(dev);
 		device_delete_child(dev, sc->bge_miibus);
 	}


More information about the svn-src-projects mailing list