don't call if_deactivate with NULL ifp.
sc->sc_ifp can be NULL if awi_pcmcia_attach() fails, so you will see panic if you remove a card which fails on attach.
This commit is contained in:
parent
5b99967f1d
commit
130ac9eafe
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: awi.c,v 1.12 2000/03/23 05:26:00 mycroft Exp $ */
|
||||
/* $NetBSD: awi.c,v 1.13 2000/03/26 10:09:33 itojun Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
|
@ -397,6 +397,7 @@ awi_activate(self, act)
|
|||
|
||||
case DVACT_DEACTIVATE:
|
||||
sc->sc_invalid = 1;
|
||||
if (sc->sc_ifp)
|
||||
if_deactivate(sc->sc_ifp);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue