[USBHUB]
authorJohannes Anderwald <johannes.anderwald@reactos.org>
Sun, 22 Jan 2012 14:51:32 +0000 (14:51 +0000)
committerJohannes Anderwald <johannes.anderwald@reactos.org>
Sun, 22 Jan 2012 14:51:32 +0000 (14:51 +0000)
- Check if there is device description buffer, as some usb devices don't provide one

svn path=/branches/usb-bringup-trunk/; revision=55070

drivers/usb/usbhub_new/pdo.c

index 111f089..fe7e7eb 100644 (file)
@@ -429,7 +429,17 @@ USBHUB_PdoQueryDeviceText(
         case DeviceTextLocationInformation:
         {
             DPRINT1("IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_TEXT / DeviceTextDescription\n");
-            SourceString = &ChildDeviceExtension->usTextDescription;
+
+            //
+            // does the device provide a text description
+            //
+            if (ChildDeviceExtension->usTextDescription->Buffer && ChildDeviceExtension->usTextDescription->Length)
+            {
+                //
+                // use device text
+                //
+                SourceString = &ChildDeviceExtension->usTextDescription;
+            }
             break;
         }
         default: