summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c
index 3badf89..cd3e72e 100644
--- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c
+++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c
@@ -956,8 +956,8 @@ MatchUsbClass (
//
// If class or subclass or protocol is 0, the counterparts in interface should be checked.
//
- if (DevDesc->DeviceClass == 0 &&
- DevDesc->DeviceSubClass == 0 &&
+ if (DevDesc->DeviceClass == 0 ||
+ DevDesc->DeviceSubClass == 0 ||
DevDesc->DeviceProtocol == 0) {
if ((UsbClassDevicePathPtr->DeviceClass == ActIfDesc->InterfaceClass ||
@@ -969,7 +969,7 @@ MatchUsbClass (
return TRUE;
}
- } else if ((UsbClassDevicePathPtr->DeviceClass != DevDesc->DeviceClass ||
+ } else if ((UsbClassDevicePathPtr->DeviceClass == DevDesc->DeviceClass ||
UsbClassDevicePathPtr->DeviceClass == 0xff) &&
(UsbClassDevicePathPtr->DeviceSubClass == DevDesc->DeviceSubClass ||
UsbClassDevicePathPtr->DeviceSubClass == 0xff) &&