]> xenbits.xensource.com Git - pvdrivers/win/xenbus.git/commitdiff
Ignore attempts to remove device usage types that were not added.
authorPaul Durrant <paul.durrant@citrix.com>
Tue, 13 Aug 2013 09:15:11 +0000 (10:15 +0100)
committerPaul Durrant <paul.durrant@citrix.com>
Tue, 13 Aug 2013 09:15:11 +0000 (10:15 +0100)
ASSERTing on this condition is not particularly helpful as other buggy
software causes BSODs. We should be able to safely ignore and succeed
such IRPs.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
src/xenbus/fdo.c

index f6ae1f1a3bf022814b4ccb596efc0526ed9b5d47..2805d85dafc2562c3331e1b26acfb5c573576db8 100644 (file)
@@ -2539,12 +2539,12 @@ FdoDeviceUsageNotification(
              DeviceUsageTypeName(Type));
         Fdo->Usage[Type]++;
     } else {
-        ASSERT(Fdo->Usage[Type] != 0);
-
-        Info("%s: REMOVING %s\n",
-             __FdoGetName(Fdo),
-             DeviceUsageTypeName(Type));
-        --Fdo->Usage[Type];
+        if (Fdo->Usage[Type] != 0) {
+            Info("%s: REMOVING %s\n",
+                 __FdoGetName(Fdo),
+                 DeviceUsageTypeName(Type));
+            --Fdo->Usage[Type];
+        }
     }
 
     status = FdoForwardIrpSynchronously(Fdo, Irp);