+ for (Index = 0; Index < NumberOfChildren; Index++) {\r
+ Status = gBS->OpenProtocol (\r
+ ChildHandleBuffer[Index],\r
+ &gXenBusProtocolGuid,\r
+ (VOID **) &XenBusIo,\r
+ This->DriverBindingHandle,\r
+ ControllerHandle,\r
+ EFI_OPEN_PROTOCOL_GET_PROTOCOL);\r
+ if (EFI_ERROR (Status)) {\r
+ DEBUG ((EFI_D_ERROR, "XenBusDxe: get children protocol failed: %r\n", Status));\r
+ continue;\r
+ }\r
+ ChildData = XENBUS_PRIVATE_DATA_FROM_THIS (XenBusIo);\r
+ Status = gBS->DisconnectController (ChildData->Handle, NULL, NULL);\r
+ if (EFI_ERROR (Status)) {\r
+ DEBUG ((EFI_D_ERROR, "XenBusDxe: error disconnecting child: %r\n",\r
+ Status));\r
+ continue;\r
+ }\r
+\r
+ Status = gBS->UninstallMultipleProtocolInterfaces (\r
+ ChildData->Handle,\r
+ &gEfiDevicePathProtocolGuid, ChildData->DevicePath,\r
+ &gXenBusProtocolGuid, &ChildData->XenBusIo,\r
+ NULL);\r
+ ASSERT_EFI_ERROR (Status);\r
+\r
+ FreePool ((VOID*)ChildData->XenBusIo.Type);\r
+ FreePool ((VOID*)ChildData->XenBusIo.Node);\r
+ FreePool ((VOID*)ChildData->XenBusIo.Backend);\r
+ FreePool (ChildData->DevicePath);\r
+ RemoveEntryList (&ChildData->Link);\r
+ FreePool (ChildData);\r
+ }\r
+ if (NumberOfChildren > 0) {\r
+ return EFI_SUCCESS;\r
+ }\r
+\r