From 04e0838d2b83ef5245e86e6088b96643d073cf45 Mon Sep 17 00:00:00 2001 From: wpaul Date: Wed, 11 Feb 2004 21:53:40 +0000 Subject: Add yet more bulletproofing. This is to guard against the case that ndis_init_nic() works one during attach, but fails later. Many things will blow up if ndis_init_nic() fails and we aren't careful. --- sys/dev/if_ndis/if_ndis.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/if_ndis/if_ndis.c b/sys/dev/if_ndis/if_ndis.c index 61c6d27..f70d2ec 100644 --- a/sys/dev/if_ndis/if_ndis.c +++ b/sys/dev/if_ndis/if_ndis.c @@ -1197,7 +1197,7 @@ ndis_intr(arg) sc = arg; ifp = &sc->arpcom.ac_if; - if (!(ifp->if_flags & IFF_UP) && + if (!(ifp->if_flags & IFF_UP) || sc->ndis_block.nmb_miniportadapterctx == NULL) return; @@ -1463,7 +1463,8 @@ ndis_init(xsc) */ ndis_reset_nic(sc); ndis_stop(sc); - ndis_init_nic(sc); + if (ndis_init_nic(sc)) + return; /* Init our MAC address */ -- cgit v1.1