diff --git a/sys/dev/usb/if_rum.c b/sys/dev/usb/if_rum.c index 76f52a78f409..8aa0f9b3de73 100644 --- a/sys/dev/usb/if_rum.c +++ b/sys/dev/usb/if_rum.c @@ -1,5 +1,5 @@ /* $OpenBSD: if_rum.c,v 1.40 2006/09/18 16:20:20 damien Exp $ */ -/* $NetBSD: if_rum.c,v 1.12 2007/06/09 12:13:12 kiyohara Exp $ */ +/* $NetBSD: if_rum.c,v 1.13 2007/07/11 20:13:14 drochner Exp $ */ /*- * Copyright (c) 2005, 2006 Damien Bergamini @@ -24,7 +24,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_rum.c,v 1.12 2007/06/09 12:13:12 kiyohara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_rum.c,v 1.13 2007/07/11 20:13:14 drochner Exp $"); #include "bpfilter.h" @@ -477,6 +477,9 @@ USB_DETACH(rum) struct ifnet *ifp = &sc->sc_if; int s; + if (!ifp->if_softc) + return 0; + s = splusb(); rum_stop(ifp, 1);