diff options
Diffstat (limited to 'EdkNt32Pkg/Dxe/WinNtThunk/Bus/WinNtBusDriver/ComponentName.c')
-rw-r--r-- | EdkNt32Pkg/Dxe/WinNtThunk/Bus/WinNtBusDriver/ComponentName.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/WinNtBusDriver/ComponentName.c b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/WinNtBusDriver/ComponentName.c index 7dee4bd9a4..b03fc8b264 100644 --- a/EdkNt32Pkg/Dxe/WinNtThunk/Bus/WinNtBusDriver/ComponentName.c +++ b/EdkNt32Pkg/Dxe/WinNtThunk/Bus/WinNtBusDriver/ComponentName.c @@ -155,12 +155,33 @@ WinNtBusDriverComponentNameGetControllerName ( WIN_NT_IO_DEVICE *Private;
//
+ // Make sure this driver is currently managing ControllHandle
+ //
+ Status = EfiTestManagedDevice (
+ ControllerHandle,
+ gWinNtBusDriverBinding.DriverBindingHandle,
+ &gEfiWinNtThunkProtocolGuid
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
+ //
// This is a bus driver, so ChildHandle can not be NULL.
//
if (ChildHandle == NULL) {
return EFI_UNSUPPORTED;
}
+ Status = EfiTestChildHandle (
+ ControllerHandle,
+ ChildHandle,
+ &gEfiWinNtThunkProtocolGuid
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
//
// Get our context back
//
|