+ Status = gBS->HandleProtocol (ImageHandle, &gEfiComponentName2ProtocolGuid, &ComponentName2);\r
+ if (EFI_ERROR (Status)) {\r
+ ComponentName2 = NULL;\r
+ }\r
+\r
+ if (ComponentName == NULL) {\r
+ if (ComponentName2 == NULL) {\r
+ Status = gBS->UninstallMultipleProtocolInterfaces (\r
+ ImageHandle,\r
+ &gEfiDriverBindingProtocolGuid, &gDebugPortDriverBinding,\r
+ NULL\r
+ );\r
+ } else {\r
+ Status = gBS->UninstallMultipleProtocolInterfaces (\r
+ ImageHandle,\r
+ &gEfiDriverBindingProtocolGuid, &gDebugPortDriverBinding,\r
+ &gEfiComponentName2ProtocolGuid, ComponentName2,\r
+ NULL\r
+ );\r
+ }\r
+ } else {\r
+ if (ComponentName2 == NULL) {\r
+ Status = gBS->UninstallMultipleProtocolInterfaces (\r
+ ImageHandle,\r
+ &gEfiDriverBindingProtocolGuid, &gDebugPortDriverBinding,\r
+ &gEfiComponentNameProtocolGuid, ComponentName,\r
+ NULL\r
+ );\r
+ } else {\r
+ Status = gBS->UninstallMultipleProtocolInterfaces (\r
+ ImageHandle,\r
+ &gEfiDriverBindingProtocolGuid, &gDebugPortDriverBinding,\r
+ &gEfiComponentNameProtocolGuid, ComponentName,\r
+ &gEfiComponentName2ProtocolGuid, ComponentName2,\r
+ NULL\r
+ );\r
+ }\r
+ }\r
+\r
+ return Status;\r