summaryrefslogtreecommitdiff
path: root/MdePkg/Library/UefiUsbLib/Hid.c
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2008-02-25 07:01:44 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2008-02-25 07:01:44 +0000
commit8069d49e9abf619afac16e44bf72266de57b1411 (patch)
treea282f6a89fab449d16accd48d1224c5d847a1082 /MdePkg/Library/UefiUsbLib/Hid.c
parent2ae8963ce89f711acd773b85ca4fe7458b9b0b84 (diff)
downloadedk2-platforms-8069d49e9abf619afac16e44bf72266de57b1411.tar.xz
update comments and add assert for these files.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4750 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/UefiUsbLib/Hid.c')
-rw-r--r--MdePkg/Library/UefiUsbLib/Hid.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/MdePkg/Library/UefiUsbLib/Hid.c b/MdePkg/Library/UefiUsbLib/Hid.c
index 7c0ee14284..9391574fe0 100644
--- a/MdePkg/Library/UefiUsbLib/Hid.c
+++ b/MdePkg/Library/UefiUsbLib/Hid.c
@@ -38,6 +38,10 @@ UsbGetHidDescriptor (
UINT32 Status;
EFI_STATUS Result;
EFI_USB_DEVICE_REQUEST Request;
+
+ if (UsbIo == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
Request.RequestType = 0x81;
Request.Request = 0x06;
@@ -88,6 +92,9 @@ UsbGetReportDescriptor (
EFI_STATUS Result;
EFI_USB_DEVICE_REQUEST Request;
+ if (UsbIo == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
//
// Fill Device request packet
//
@@ -137,6 +144,9 @@ UsbGetProtocolRequest (
EFI_STATUS Result;
EFI_USB_DEVICE_REQUEST Request;
+ if (UsbIo == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
//
// Fill Device request packet
//
@@ -187,6 +197,9 @@ UsbSetProtocolRequest (
EFI_STATUS Result;
EFI_USB_DEVICE_REQUEST Request;
+ if (UsbIo == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
//
// Fill Device request packet
//
@@ -238,6 +251,9 @@ UsbSetIdleRequest (
EFI_STATUS Result;
EFI_USB_DEVICE_REQUEST Request;
+ if (UsbIo == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
//
// Fill Device request packet
//
@@ -287,7 +303,10 @@ UsbGetIdleRequest (
UINT32 Status;
EFI_STATUS Result;
EFI_USB_DEVICE_REQUEST Request;
-
+
+ if (UsbIo == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
//
// Fill Device request packet
//
@@ -344,6 +363,9 @@ UsbSetReportRequest (
EFI_STATUS Result;
EFI_USB_DEVICE_REQUEST Request;
+ if (UsbIo == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
//
// Fill Device request packet
//
@@ -399,6 +421,9 @@ UsbGetReportRequest (
EFI_STATUS Result;
EFI_USB_DEVICE_REQUEST Request;
+ if (UsbIo == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
//
// Fill Device request packet
//