mirror of https://github.com/acidanthera/audk.git
OvmfPkg/VirtioNetDxe: Check ChildHandle argument in GetControllerName
Per the UEFI specification, a device driver implementation should return EFI_UNSUPPORTED if the ChildHandle argument in EFI_COMPONENT_NAME2_PROTOCOL.GetControllerName() is not NULL. Signed-off-by: Dimitrije Pavlov <Dimitrije.Pavlov@arm.com> Reviewed-by: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com> Reviewed-by: Sunny Wang <sunny.wang@arm.com>
This commit is contained in:
parent
8db4e9f9a0
commit
f80580f56b
|
@ -129,6 +129,13 @@ VirtioNetGetControllerName (
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// This is a device driver, so ChildHandle must be NULL.
|
||||||
|
//
|
||||||
|
if (ChildHandle != NULL) {
|
||||||
|
return EFI_UNSUPPORTED;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// confirm that the device is managed by this driver, using the VirtIo
|
// confirm that the device is managed by this driver, using the VirtIo
|
||||||
// Protocol
|
// Protocol
|
||||||
|
|
Loading…
Reference in New Issue