From adc863cbd42c24c6f32597915cb8a5329e0806ce Mon Sep 17 00:00:00 2001 From: qhuang8 Date: Tue, 19 Feb 2008 04:13:25 +0000 Subject: [PATCH] Add checking for ChildHandle. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4701 6f19259b-4bc3-4df7-8a09-765794883524 --- Nt32Pkg/WinNtBlockIoDxe/DriverDiagnostics.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Nt32Pkg/WinNtBlockIoDxe/DriverDiagnostics.c b/Nt32Pkg/WinNtBlockIoDxe/DriverDiagnostics.c index 1060d46001..fb162aa30d 100644 --- a/Nt32Pkg/WinNtBlockIoDxe/DriverDiagnostics.c +++ b/Nt32Pkg/WinNtBlockIoDxe/DriverDiagnostics.c @@ -184,6 +184,13 @@ WinNtBlockIoDriverDiagnosticsRunDiagnostics ( return EFI_DEVICE_ERROR; } + // + // This is a device driver, so ChildHandle must be NULL. + // + if (ChildHandle != NULL) { + return EFI_UNSUPPORTED; + } + // // Validate controller handle // @@ -207,6 +214,7 @@ WinNtBlockIoDriverDiagnosticsRunDiagnostics ( return EFI_UNSUPPORTED; } + if (Status == EFI_UNSUPPORTED) { return Status; } else if (Status != EFI_ALREADY_STARTED) {