summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointer.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointer.c')
-rw-r--r--MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointer.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointer.c b/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointer.c
index 35be8b0397..2f3cf9aae2 100644
--- a/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointer.c
+++ b/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointer.c
@@ -149,7 +149,9 @@ USBMouseAbsolutePointerDriverBindingStart (
UINT8 PollingInterval;
UINT8 PacketSize;
BOOLEAN Found;
+ EFI_TPL OldTpl;
+ OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
//
// Open USB I/O Protocol
//
@@ -162,7 +164,7 @@ USBMouseAbsolutePointerDriverBindingStart (
EFI_OPEN_PROTOCOL_BY_DRIVER
);
if (EFI_ERROR (Status)) {
- return Status;
+ goto ErrorExit1;
}
UsbMouseAbsolutePointerDevice = AllocateZeroPool (sizeof (USB_MOUSE_ABSOLUTE_POINTER_DEV));
@@ -324,6 +326,7 @@ USBMouseAbsolutePointerDriverBindingStart (
FALSE
);
+ gBS->RestoreTPL (OldTpl);
return EFI_SUCCESS;
//
@@ -348,6 +351,9 @@ ErrorExit:
}
}
+ErrorExit1:
+ gBS->RestoreTPL (OldTpl);
+
return Status;
}