From 1f9f60ad5a2de3b6020b792296a1a69b826903fa Mon Sep 17 00:00:00 2001 From: Dandan Bi Date: Wed, 6 Jan 2016 00:52:53 +0000 Subject: 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 Reviewed-by: Eric Dong Reviewed-by: Liming Gao git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19590 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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, -- cgit v1.2.3