MdeModulePkg:Avoid ASSERT in HiiConfigRoutingRouteConfig

Add error handling code to enhance the code,the driver may not install
the ConfigAccess protocol,so should not just ASSERT here.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19590 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Dandan Bi 2016-01-06 00:52:53 +00:00 committed by dandanbi
parent 86f2165dc3
commit 1f9f60ad5a
1 changed files with 5 additions and 1 deletions

View File

@ -4346,7 +4346,11 @@ HiiConfigRoutingRouteConfig (
&gEfiHiiConfigAccessProtocolGuid,
(VOID **) &ConfigAccess
);
ASSERT_EFI_ERROR (Status);
if (EFI_ERROR (Status)) {
*Progress = StringPtr;
FreePool (ConfigResp);
return EFI_NOT_FOUND;
}
Status = ConfigAccess->RouteConfig (
ConfigAccess,