Update.
Check for usb devices with no subdevices before force detaching subdevs.
Index: usb_subr.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/usb_subr.c,v
retrieving revision 1.118
diff -u -p -r1.118 usb_subr.c
--- usb_subr.c 24 Oct 2015 14:01:40 -0000 1.118
+++ usb_subr.c 14 Jan 2016 01:36:04 -0000
@@ -1382,6 +1382,11 @@ usbd_detach(struct usbd_device *dev, str
usbd_deactivate(dev);
+ if (dev->ndevs == 0) {
+ usb_free_device(dev);
+ return (rv);
+ }
+
for (i = 0; dev->subdevs[i] != NULL; i++)
rv |= config_detach(dev->subdevs[i], DETACH_FORCE);