[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[win-pv-devel] [PATCH for 8.1 2/2] Fix snafu on setting active device when no vendor device is set



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@xxxxxxxxxx>
---
 src/xenbus/driver.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/xenbus/driver.c b/src/xenbus/driver.c
index b1a5cb3..73625ef 100644
--- a/src/xenbus/driver.c
+++ b/src/xenbus/driver.c
@@ -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,
-- 
2.1.1


_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.