Skip to content

Commit ccbb2c9

Browse files
committed
MdeModulePkg: Add a check and close BlockIo2protocol in DiskIo Driver
start. REF : tianocore#10727 The check needs to be added for the BlockIo2 protocol in the ErrorExit, and it should be closed properly if the BlockIo2 protocol is opened. branch Kanagavel/MdeModulePkg
1 parent ed3a8c7 commit ccbb2c9

File tree

1 file changed

+9
-0
lines changed
  • MdeModulePkg/Universal/Disk/DiskIoDxe

1 file changed

+9
-0
lines changed

MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIo.c

+9
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,15 @@ DiskIoDriverBindingStart (
226226
This->DriverBindingHandle,
227227
ControllerHandle
228228
);
229+
230+
if (gDiskIoPrivateDataTemplate.BlockIo2 != NULL) {
231+
gBS->CloseProtocol (
232+
ControllerHandle,
233+
&gEfiBlockIoProtocolGuid,
234+
This->DriverBindingHandle,
235+
ControllerHandle
236+
);
237+
}
229238
}
230239

231240
ErrorExit1:

0 commit comments

Comments
 (0)