git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5914
6f19259b-4bc3-4df7-8a09-
765794883524
-//\r
-// Include common header file for this module.\r
-//\r
-\r
-\r
#include <ConPlatform.h>\r
\r
//\r
#include <ConPlatform.h>\r
\r
//\r
mConIn.VirtualHandle,\r
EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
);\r
mConIn.VirtualHandle,\r
EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
);\r
- if (EFI_ERROR (Status)) {\r
- return Status;\r
+ if (!EFI_ERROR (Status)) {\r
+ //\r
+ // If Simple Text Input Ex protocol exists,\r
+ // add this device into Text In Ex devices list.\r
+ //\r
+ Status = ConSplitterTextInExAddDevice (&mConIn, TextInEx);\r
- //\r
- // Add this device into Text In Ex devices list.\r
- //\r
- Status = ConSplitterTextInExAddDevice (&mConIn, TextInEx);\r
-\r
IN EFI_HANDLE *ChildHandleBuffer\r
)\r
{\r
IN EFI_HANDLE *ChildHandleBuffer\r
)\r
{\r
- EFI_STATUS Status;\r
- EFI_SIMPLE_TEXT_INPUT_PROTOCOL *TextIn;\r
-\r
+ EFI_STATUS Status;\r
+ EFI_SIMPLE_TEXT_INPUT_PROTOCOL *TextIn;\r
EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *TextInEx;\r
EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *TextInEx;\r
if (NumberOfChildren == 0) {\r
return EFI_SUCCESS;\r
}\r
if (NumberOfChildren == 0) {\r
return EFI_SUCCESS;\r
}\r
ControllerHandle,\r
EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
);\r
ControllerHandle,\r
EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
);\r
- if (EFI_ERROR (Status)) {\r
- return Status;\r
- }\r
-\r
- //\r
- // Remove device from Text Input Ex devices list.\r
- // \r
- Status = ConSplitterTextInExDeleteDevice (&mConIn, TextInEx);\r
- if (EFI_ERROR (Status)) {\r
- return Status;\r
+ if (!EFI_ERROR (Status)) {\r
+ //\r
+ // If Simple Text Input Ex protocol exists,\r
+ // remove device from Text Input Ex devices list.\r
+ // \r
+ Status = ConSplitterTextInExDeleteDevice (&mConIn, TextInEx);\r
+ if (EFI_ERROR (Status)) {\r
+ return Status;\r
+ }\r
//\r
// Close Simple Text In protocol on controller handle and virtual handle.\r
//\r
//\r
// Close Simple Text In protocol on controller handle and virtual handle.\r
//\r