summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDandan Bi <dandan.bi@intel.com>2016-01-06 00:52:53 +0000
committerdandanbi <dandanbi@Edk2>2016-01-06 00:52:53 +0000
commit1f9f60ad5a2de3b6020b792296a1a69b826903fa (patch)
treea9edb25500e651c55377d1ae7e70fee3aed70816
parent86f2165dc37427f4a9f781ee1c6957eeca1460b1 (diff)
downloadedk2-platforms-1f9f60ad5a2de3b6020b792296a1a69b826903fa.tar.xz
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
-rw-r--r--MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
index 55ac08cedb..8f0b96847d 100644
--- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
+++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
@@ -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,