ed_ioctl() can be called from ifpromisc() after the card has been removed,

don't panic on a NULL pointer in that case.
This commit is contained in:
Poul-Henning Kamp 2000-06-01 21:55:49 +00:00
parent 51f32c1d17
commit 855e8bb9ad
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=61152

View File

@ -2507,7 +2507,7 @@ ed_ioctl(ifp, command, data)
struct ed_softc *sc = ifp->if_softc;
int s, error = 0;
if (sc->gone) {
if (sc == NULL || sc->gone) {
ifp->if_flags &= ~IFF_RUNNING;
return ENXIO;
}