diff options
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/usb/if_upl.c | 5 | ||||
-rw-r--r-- | sys/dev/usb/ueagle.c | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/usb/if_upl.c b/sys/dev/usb/if_upl.c index a3599941706..0c91e0773a1 100644 --- a/sys/dev/usb/if_upl.c +++ b/sys/dev/usb/if_upl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_upl.c,v 1.44 2010/09/24 08:33:59 yuo Exp $ */ +/* $OpenBSD: if_upl.c,v 1.45 2010/12/06 05:46:17 jakemsr Exp $ */ /* $NetBSD: if_upl.c,v 1.19 2002/07/11 21:14:26 augustss Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -334,7 +334,8 @@ upl_detach(struct device *self, int flags) if (ifp->if_flags & IFF_RUNNING) upl_stop(sc); - if_detach(ifp); + if (ifp->if_softc != NULL) + if_detach(ifp); #ifdef DIAGNOSTIC if (sc->sc_ep[UPL_ENDPT_TX] != NULL || diff --git a/sys/dev/usb/ueagle.c b/sys/dev/usb/ueagle.c index 4416d07d9f5..a7749a131fa 100644 --- a/sys/dev/usb/ueagle.c +++ b/sys/dev/usb/ueagle.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ueagle.c,v 1.30 2010/12/06 04:41:40 jakemsr Exp $ */ +/* $OpenBSD: ueagle.c,v 1.31 2010/12/06 05:46:17 jakemsr Exp $ */ /*- * Copyright (c) 2003-2006 @@ -256,7 +256,8 @@ ueagle_detach(struct device *self, int flags) sc->sc_dev.dv_xname)); } - if_detach(ifp); + if (ifp->if_softc != NULL) + if_detach(ifp); usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev, &sc->sc_dev); |