- Only register a shutdown handler if adapter initialization has succeeded

svn path=/trunk/; revision=41161
This commit is contained in:
Cameron Gutman
2009-05-27 21:45:01 +00:00
parent 92d38ba763
commit cabc0627ac
+3 -2
View File
@@ -988,6 +988,9 @@ MiniportInitialize(
Adapter);
NdisMSetPeriodicTimer(&Adapter->MediaDetectionTimer,
MEDIA_DETECTION_INTERVAL);
NdisMRegisterAdapterShutdownHandler(Adapter->MiniportAdapterHandle,
Adapter,
MiniportShutdown);
}
#if DBG
@@ -995,8 +998,6 @@ MiniportInitialize(
ASSERT(0);
#endif
NdisMRegisterAdapterShutdownHandler(Adapter->MiniportAdapterHandle, Adapter, MiniportShutdown);
DPRINT("returning 0x%x\n", Status);
*OpenErrorStatus = Status;
return Status;