MdeModulePkg/Ufs :Coverity scan flags multiple issues in edk2-stable202205

BugZilla ID:https://bugzilla.tianocore.org/show_bug.cgi?id=3989

Added changes to resolve the Coverity Issues in UFS driver

Cc: Vasudevan Sambandan <vasudevans@ami.com>
Cc: Sundaresan Selvaraj <sundaresans@ami.com>
Signed-off-by: Sivaparvathi Chellaiah <sivaparvathic@ami.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
This commit is contained in:
Sivaparvathi C 2022-10-28 12:48:32 +05:30 committed by mergify[bot]
parent eae9e51d98
commit ee3da09bb2
2 changed files with 24 additions and 13 deletions

View File

@ -2,7 +2,7 @@
The DMA memory help function.
Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
Copyright (c) 1985 - 2022, American Megatrends International LLC. <BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@ -240,10 +240,16 @@ IoMmuInit (
VOID
)
{
PeiServicesLocatePpi (
EFI_STATUS Status;
Status = PeiServicesLocatePpi (
&gEdkiiIoMmuPpiGuid,
0,
NULL,
(VOID **)&mIoMmu
);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_INFO, "Locate mIoMmu Ppi is failed!!!\n"));
}
}

View File

@ -1,6 +1,7 @@
/** @file
Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR>
Copyright (c) 1985 - 2022, American Megatrends International LLC. <BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@ -414,6 +415,10 @@ UfsPeimFreeMem (
//
ASSERT (Block != NULL);
if (Block == NULL) {
return;
}
//
// Release the current memory block if it is empty and not the head
//