From f0f22e7bb2715058a4795f117e4c1a48737bf377 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Sun, 22 Jan 2012 14:51:32 +0000 Subject: [PATCH 1/1] [USBHUB] - 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 | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/usb/usbhub_new/pdo.c b/drivers/usb/usbhub_new/pdo.c index 111f0899238..fe7e7ebe494 100644 --- a/drivers/usb/usbhub_new/pdo.c +++ b/drivers/usb/usbhub_new/pdo.c @@ -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: -- 2.17.1