diff options
Diffstat (limited to 'EdkUnixPkg/Dxe/UnixThunk/Bus/UnixBusDriver/ComponentName.c')
-rw-r--r-- | EdkUnixPkg/Dxe/UnixThunk/Bus/UnixBusDriver/ComponentName.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/EdkUnixPkg/Dxe/UnixThunk/Bus/UnixBusDriver/ComponentName.c b/EdkUnixPkg/Dxe/UnixThunk/Bus/UnixBusDriver/ComponentName.c index 2045f8fdd6..7ea1eacc1a 100644 --- a/EdkUnixPkg/Dxe/UnixThunk/Bus/UnixBusDriver/ComponentName.c +++ b/EdkUnixPkg/Dxe/UnixThunk/Bus/UnixBusDriver/ComponentName.c @@ -155,12 +155,33 @@ UnixBusDriverComponentNameGetControllerName ( UNIX_IO_DEVICE *Private;
//
+ // Make sure this driver is currently managing ControllHandle
+ //
+ Status = EfiTestManagedDevice (
+ ControllerHandle,
+ gUnixBusDriverBinding.DriverBindingHandle,
+ &gEfiUnixThunkProtocolGuid
+ );
+ 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,
+ &gEfiUnixThunkProtocolGuid
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
//
// Get our context back
//
|