summaryrefslogtreecommitdiff
path: root/EdkNt32Pkg/Dxe/WinNtThunk/Bus/SerialIo/ComponentName.c
diff options
context:
space:
mode:
Diffstat (limited to 'EdkNt32Pkg/Dxe/WinNtThunk/Bus/SerialIo/ComponentName.c')
-rw-r--r--EdkNt32Pkg/Dxe/WinNtThunk/Bus/SerialIo/ComponentName.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/SerialIo/ComponentName.c b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/SerialIo/ComponentName.c
index 82057866c7..d22f030f4b 100644
--- a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/SerialIo/ComponentName.c
+++ b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/SerialIo/ComponentName.c
@@ -155,12 +155,33 @@ WinNtSerialIoComponentNameGetControllerName (
WIN_NT_SERIAL_IO_PRIVATE_DATA *Private;
//
+ // Make sure this driver is currently managing ControllHandle
+ //
+ Status = EfiTestManagedDevice (
+ ControllerHandle,
+ gWinNtSerialIoDriverBinding.DriverBindingHandle,
+ &gEfiWinNtIoProtocolGuid
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
+ //
// This is a bus driver, so ChildHandle must not be NULL.
//
if (ChildHandle == NULL) {
return EFI_UNSUPPORTED;
}
+ Status = EfiTestChildHandle (
+ ControllerHandle,
+ ChildHandle,
+ &gEfiWinNtIoProtocolGuid
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
//
// Get our context back
//