NetworkPkg/Ip4Dxe: Fix missing Status check on Ip4Cfg2->SetData call

In Ip4Config2ConvertIfrNvDataToConfigNvData(), when the policy is
changed away from a static configuration (PolicyChanged is TRUE), the
first call to Ip4Cfg2->SetData() was not checking its return value and
always returned EFI_SUCCESS. Fix this to check and return Status on
error, consistent with the second SetData call in the same function.

Cc: Saloni Kasbekar <saloni.kasbekar@intel.com>
Cc: Zachary Clark-williams <zachary.clark-williams@intel.com>

Signed-off-by: abuthahirm <abuthahirm@ami.com>
This commit is contained in:
abuthahirm 2026-03-25 19:43:25 +05:30 committed by mergify[bot]
parent f1f89f454c
commit ccc95703cd

View file

@ -575,7 +575,7 @@ Ip4Config2ConvertIfrNvDataToConfigNvData (
sizeof (EFI_IP4_CONFIG2_POLICY),
&Ip4NvData->Policy
);
return EFI_SUCCESS;
return Status;
}
if (IfrFormNvData->DhcpEnable == TRUE) {