summaryrefslogtreecommitdiff
path: root/EdkUnixPkg/Dxe/UnixThunk/Bus/Uga/ComponentName.c
diff options
context:
space:
mode:
Diffstat (limited to 'EdkUnixPkg/Dxe/UnixThunk/Bus/Uga/ComponentName.c')
-rw-r--r--EdkUnixPkg/Dxe/UnixThunk/Bus/Uga/ComponentName.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/EdkUnixPkg/Dxe/UnixThunk/Bus/Uga/ComponentName.c b/EdkUnixPkg/Dxe/UnixThunk/Bus/Uga/ComponentName.c
index e6e5ebe3a5..5c50d5689c 100644
--- a/EdkUnixPkg/Dxe/UnixThunk/Bus/Uga/ComponentName.c
+++ b/EdkUnixPkg/Dxe/UnixThunk/Bus/Uga/ComponentName.c
@@ -162,6 +162,17 @@ UnixUgaComponentNameGetControllerName (
}
//
+ // Make sure this driver is currently managing ControllerHandle
+ //
+ Status = EfiTestManagedDevice (
+ ControllerHandle,
+ gUnixUgaDriverBinding.DriverBindingHandle,
+ &gEfiUnixIoProtocolGuid
+ );
+ if (EFI_ERROR (Status)) {
+ return EFI_UNSUPPORTED;
+ }
+ //
// Get our context back
//
Status = gBS->OpenProtocol (