@@ -456,18 +456,10 @@ OvsCreateDeviceObject(NDIS_HANDLE ovsExtDriverHandle)
&deviceAttributes,
&gOvsDeviceObject,
&gOvsDeviceHandle);
- if (status != NDIS_STATUS_SUCCESS) {
- POVS_DEVICE_EXTENSION ovsExt =
- (POVS_DEVICE_EXTENSION)NdisGetDeviceReservedExtension(gOvsDeviceObject);
- ASSERT(gOvsDeviceObject != NULL);
- ASSERT(gOvsDeviceHandle != NULL);
-
- if (ovsExt) {
- ovsExt->numberOpenInstance = 0;
- }
- } else {
+ if (status == NDIS_STATUS_SUCCESS) {
OvsRegisterSystemProvider((PVOID)gOvsDeviceObject);
}
+ ASSERT(status == NDIS_STATUS_SUCCESS || gOvsDeviceObject == NULL);
OVS_LOG_TRACE("DeviceObject: %p", gOvsDeviceObject);
return status;
The error handling code seems to be wrong. Signed-off-by: Nithin Raju <nithin@vmware.com> --- datapath-windows/ovsext/Datapath.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-)