summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MdePkg/Library/UefiUsbLib/UsbDxeLib.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/MdePkg/Library/UefiUsbLib/UsbDxeLib.c b/MdePkg/Library/UefiUsbLib/UsbDxeLib.c
index c27fb03499..521fdd0101 100644
--- a/MdePkg/Library/UefiUsbLib/UsbDxeLib.c
+++ b/MdePkg/Library/UefiUsbLib/UsbDxeLib.c
@@ -177,6 +177,8 @@ UsbGetInterface (
ASSERT (AlternateSetting != NULL);
ASSERT (Status != NULL);
+ *AlternateSetting = 0;
+
ZeroMem (&DevReq, sizeof (EFI_USB_DEVICE_REQUEST));
DevReq.RequestType = USB_DEV_GET_INTERFACE_REQ_TYPE;
@@ -283,6 +285,8 @@ UsbGetConfiguration (
ASSERT (ConfigurationValue != NULL);
ASSERT (Status != NULL);
+ *ConfigurationValue = 0;
+
ZeroMem (&DevReq, sizeof (EFI_USB_DEVICE_REQUEST));
DevReq.RequestType = USB_DEV_GET_CONFIGURATION_REQ_TYPE;