summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Bus
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Bus')
-rw-r--r--MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c
index 4fbe199390..81653af5a8 100644
--- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c
+++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c
@@ -2191,6 +2191,8 @@ SignalCallerEvent (
EDKII_UFS_HOST_CONTROLLER_PROTOCOL *UfsHc;
EFI_EVENT CallerEvent;
+ ASSERT ((Private != NULL) && (TransReq != NULL));
+
UfsHc = Private->UfsHostController;
CallerEvent = TransReq->CallerEvent;
@@ -2214,9 +2216,8 @@ SignalCallerEvent (
TransReq->CmdDescHost
);
}
- if (TransReq != NULL) {
- FreePool (TransReq);
- }
+
+ FreePool (TransReq);
gBS->SignalEvent (CallerEvent);
return;