]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/UefiUsbLib/UsbDxeLib.c
[Description]
[mirror_edk2.git] / MdePkg / Library / UefiUsbLib / UsbDxeLib.c
index 07fe0fe0f8df0e230f3013f30d04dddc0f974ade..a3ac0e614016ecff0da5c5ba3c8201c3fe77b8a7 100644 (file)
@@ -1,15 +1,18 @@
 /** @file\r
 \r
-Copyright (c) 2004 - 2007, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution.  The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-   Common Dxe Libarary  for USB\r
+  The library provides the USB descritor, interface and protocol\r
+  operations.\r
+  \r
+  Copyright (c) 2004 - 2007, Intel Corporation All rights\r
+  reserved. This program and the accompanying materials are\r
+  licensed and made available under the terms and conditions of\r
+  the BSD License which accompanies this distribution.  The full\r
+  text of the license may be found at\r
+  http://opensource.org/licenses/bsd-license.php\r
+  \r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+  \r
 \r
 **/\r
 \r
@@ -527,6 +530,10 @@ UsbClearEndpointHalt (
   EFI_USB_INTERFACE_DESCRIPTOR  InterfaceDescriptor;\r
   UINT8                         Index;\r
 \r
+  if (UsbIo == NULL) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
+\r
   ZeroMem (&EndpointDescriptor, sizeof (EFI_USB_ENDPOINT_DESCRIPTOR));\r
   //\r
   // First seach the endpoint descriptor for that endpoint addr\r
@@ -564,7 +571,7 @@ UsbClearEndpointHalt (
   Result = UsbClearFeature (\r
             UsbIo,\r
             USB_TARGET_ENDPOINT,\r
-            EfiUsbEndpointHalt,\r
+            USB_FEATURE_ENDPOINT_HALT,\r
             EndpointDescriptor.EndpointAddress,\r
             Status\r
             );\r