X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdeModulePkg%2FBus%2FUsb%2FUsbMassStorageDxe%2FUsbMassBot.c;h=ab669463c8c1b62a43e7eb3ca82fc19251c36bfd;hb=c92e277d99335fa827994e410a3dc0830904a264;hp=178aa80d3e3ab3560a4961fa7482591a0b3acb4c;hpb=d80ed2a76eec1786412fb76cc080cfb38ae77011;p=mirror_edk2.git diff --git a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBot.c b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBot.c index 178aa80d3e..ab669463c8 100644 --- a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBot.c +++ b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBot.c @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -#include "UsbMass.h" +#include "UsbMassBoot.h" #include "UsbMassBot.h" // @@ -58,9 +58,7 @@ UsbBotInit ( // // Allocate the BOT context for USB_BOT_PROTOCOL and two endpoint descriptors. // - UsbBot = AllocateZeroPool ( - sizeof (USB_BOT_PROTOCOL) + 2 * sizeof (EFI_USB_ENDPOINT_DESCRIPTOR) - ); + UsbBot = AllocateZeroPool (sizeof (USB_BOT_PROTOCOL) + 2 * sizeof (EFI_USB_ENDPOINT_DESCRIPTOR)); ASSERT (UsbBot != NULL); UsbBot->UsbIo = UsbIo; @@ -103,7 +101,7 @@ UsbBotInit ( (UsbBot->BulkOutEndpoint == NULL)) { UsbBot->BulkOutEndpoint = (EFI_USB_ENDPOINT_DESCRIPTOR *) (UsbBot + 1) + 1; - CopyMem(UsbBot->BulkOutEndpoint, &EndPoint, sizeof(EndPoint)); + CopyMem (UsbBot->BulkOutEndpoint, &EndPoint, sizeof(EndPoint)); } } @@ -123,13 +121,13 @@ UsbBotInit ( if (Context != NULL) { *Context = UsbBot; } else { - gBS->FreePool (UsbBot); + FreePool (UsbBot); } return EFI_SUCCESS; ON_ERROR: - gBS->FreePool (UsbBot); + FreePool (UsbBot); return Status; } @@ -589,7 +587,7 @@ UsbBotCleanUp ( IN VOID *Context ) { - gBS->FreePool (Context); + FreePool (Context); return EFI_SUCCESS; }