]> xenbits.xensource.com Git - people/pauldu/xenbus.git/commitdiff
Fix snafu on setting active device when no vendor device is set
authorPaul Durrant <paul.durrant@citrix.com>
Thu, 3 Dec 2015 12:33:38 +0000 (12:33 +0000)
committerPaul Durrant <paul.durrant@citrix.com>
Thu, 3 Dec 2015 12:39:16 +0000 (12:39 +0000)
If XENBUS is built with no vendor device then the check for vendor device
presences was using NULL. This patch skips the check in that case.

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

index b1a5cb30320603f09ef15ec3a844487861ac278c..73625efb98d00566fb870dafa8251b6fe60693a3 100644 (file)
@@ -292,15 +292,18 @@ DriverGetActive(
     return STATUS_SUCCESS;
 
 fail3:
-    Error("fail3\n");
+    if (status != STATUS_OBJECT_NAME_NOT_FOUND)
+        Error("fail3\n");
 
 fail2:
-    Error("fail2\n");
+    if (status != STATUS_OBJECT_NAME_NOT_FOUND)
+        Error("fail2\n");
 
     RegistryCloseKey(ActiveKey);
 
 fail1:
-    Error("fail1 (%08x)\n", status);
+    if (status != STATUS_OBJECT_NAME_NOT_FOUND)
+        Error("fail1 (%08x)\n", status);
 
     return status;
 }
@@ -346,6 +349,9 @@ __DriverIsVendorDevicePresent(
     BOOLEAN     Found;
     NTSTATUS    status;
 
+    if (DriverVendorDeviceID == NULL)
+        return FALSE;
+
     status = RegistryOpenSubKey(NULL,
                                 ENUM_PATH,
                                 KEY_READ,