MdeModulePkg/UsbMass: remove unnecessary RestoreTPL() call

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
Ruiyu Ni 2018-03-02 17:33:15 +08:00
parent e149055310
commit cd626ef0fb
1 changed files with 4 additions and 9 deletions

View File

@ -691,7 +691,6 @@ UsbBootDetectMedia (
EFI_BLOCK_IO_MEDIA OldMedia;
EFI_BLOCK_IO_MEDIA *Media;
UINT8 CmdSet;
EFI_TPL OldTpl;
EFI_STATUS Status;
Media = &UsbMass->BlockIoMedia;
@ -740,11 +739,10 @@ ON_ERROR:
(Media->LastBlock != OldMedia.LastBlock)) {
//
// This function is called by Block I/O Protocol APIs, which run at TPL_NOTIFY.
// Here we temporarily restore TPL to TPL_CALLBACK to invoke ReinstallProtocolInterface().
//
OldTpl = EfiGetCurrentTpl ();
gBS->RestoreTPL (TPL_CALLBACK);
// This function is called from:
// Block I/O Protocol APIs, which run at TPL_CALLBACK.
// DriverBindingStart(), which raises to TPL_CALLBACK.
ASSERT (EfiGetCurrentTpl () == TPL_CALLBACK);
gBS->ReinstallProtocolInterface (
UsbMass->Controller,
@ -753,9 +751,6 @@ ON_ERROR:
&UsbMass->BlockIo
);
ASSERT (EfiGetCurrentTpl () == TPL_CALLBACK);
gBS->RaiseTPL (OldTpl);
//
// Update MediaId after reinstalling Block I/O Protocol.
//