summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c
diff options
context:
space:
mode:
authorgikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524>2008-12-26 08:42:24 +0000
committergikidy <gikidy@6f19259b-4bc3-4df7-8a09-765794883524>2008-12-26 08:42:24 +0000
commitd17371e86b1be22fb3d810aa0a1045e6d4ec9847 (patch)
tree145876753468f1d64975906b8144e2b8a68cd4fc /MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c
parentec30be9e8c5a1f52b1f071c90a3bad7d745af7ec (diff)
downloadedk2-d17371e86b1be22fb3d810aa0a1045e6d4ec9847.tar.gz
edk2-d17371e86b1be22fb3d810aa0a1045e6d4ec9847.tar.bz2
edk2-d17371e86b1be22fb3d810aa0a1045e6d4ec9847.zip
Check Library usage and fix some typo.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7137 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c')
-rw-r--r--MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c
index 0904e72a65..46be2df40e 100644
--- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c
+++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c
@@ -32,9 +32,12 @@ UsbGetEndpointDesc (
)
{
USB_ENDPOINT_DESC *EpDesc;
- UINTN Index;
-
- for (Index = 0; Index < UsbIf->IfSetting->Desc.NumEndpoints; Index++) {
+ UINT8 Index;
+ UINT8 NumEndpoints;
+
+ NumEndpoints = UsbIf->IfSetting->Desc.NumEndpoints;
+
+ for (Index = 0; Index < NumEndpoints; Index++) {
EpDesc = UsbIf->IfSetting->Endpoints[Index];
if (EpDesc->Desc.EndpointAddress == EpAddr) {
@@ -71,10 +74,10 @@ UsbFreeInterface (
);
if (UsbIf->DevicePath != NULL) {
- gBS->FreePool (UsbIf->DevicePath);
+ FreePool (UsbIf->DevicePath);
}
- gBS->FreePool (UsbIf);
+ FreePool (UsbIf);
}
@@ -175,10 +178,10 @@ UsbCreateInterface (
ON_ERROR:
if (UsbIf->DevicePath != NULL) {
- gBS->FreePool (UsbIf->DevicePath);
+ FreePool (UsbIf->DevicePath);
}
- gBS->FreePool (UsbIf);
+ FreePool (UsbIf);
return NULL;
}
@@ -240,7 +243,7 @@ UsbCreateDevice (
/**
Connect the USB interface with its driver. EFI USB bus will
- create a USB interface for each seperate interface descriptor.
+ create a USB interface for each separate interface descriptor.
@param UsbIf The interface to connect driver to.