/** @file\r
The driver binding and service binding protocol for IP6 driver.\r
\r
- Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>\r
\r
This program and the accompanying materials\r
IN VOID *Context\r
)\r
{\r
+ EFI_STATUS Status;\r
//\r
- // Close the event so it does not get called again.\r
+ // Test if protocol was even found.\r
+ // Notification function will be called at least once.\r
//\r
- gBS->CloseEvent (Event);\r
-\r
- mIpSec2Installed = TRUE;\r
+ Status = gBS->LocateProtocol (&gEfiIpSec2ProtocolGuid, NULL, (VOID **)&mIpSec);\r
+ if (Status == EFI_SUCCESS && mIpSec != NULL) {\r
+ //\r
+ // Close the event so it does not get called again.\r
+ //\r
+ gBS->CloseEvent (Event);\r
\r
- return;\r
+ mIpSec2Installed = TRUE;\r
+ }\r
}\r
\r
/**\r
the existing child handle.\r
\r
@retval EFI_SUCCES The child handle was created with the I/O services.\r
- @retval EFI_OUT_OF_RESOURCES There are not enough resources availabe to create\r
+ @retval EFI_OUT_OF_RESOURCES There are not enough resources available to create\r
the child.\r
@retval other The child handle was not created.\r
\r