mirror of https://github.com/acidanthera/audk.git
MdeModulePkg NvmExpressDxe: return error code in error path
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=937 In NvmeExpressPassthru.c near line 659: Prp = NvmeCreatePrpList ( PciIo, PhyAddr, EFI_SIZE_TO_PAGES(Offset + Bytes) - 1, &PrpListHost, &PrpListNo, &MapPrpList ); if (Prp == NULL) { goto EXIT; } Status is not set to an error code - Status is initialized to EFI_SUCCESS, or set by a PciIo->Map to EFI_SUCCESS above this code. This error path should set Status to an error code before goto EXIT. Change-Id: I8a5cdf981aa609534c205d3676395805ac60a003 Cc: Hao Wu <hao.a.wu@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Michael Turner <Michael.Turner@microsoft.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
This commit is contained in:
parent
3545488dd6
commit
67d3e63c2c
|
@ -656,6 +656,7 @@ NvmExpressPassThru (
|
|||
PhyAddr = (Sq->Prp[0] + EFI_PAGE_SIZE) & ~(EFI_PAGE_SIZE - 1);
|
||||
Prp = NvmeCreatePrpList (PciIo, PhyAddr, EFI_SIZE_TO_PAGES(Offset + Bytes) - 1, &PrpListHost, &PrpListNo, &MapPrpList);
|
||||
if (Prp == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto EXIT;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue