Fix K8 report bugs.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8139 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -360,6 +360,14 @@ IDEBusDriverBindingStart (
|
||||
EndIdeChannel = BeginningIdeChannel;
|
||||
BeginningIdeDevice = Node->Atapi.SlaveMaster;
|
||||
EndIdeDevice = BeginningIdeDevice;
|
||||
if (BeginningIdeChannel >= IdeMaxChannel || EndIdeChannel >= IdeMaxChannel) {
|
||||
Status = EFI_INVALID_PARAMETER;
|
||||
goto ErrorExit;
|
||||
}
|
||||
if (BeginningIdeDevice >= IdeMaxDevice|| EndIdeDevice >= IdeMaxDevice) {
|
||||
Status = EFI_INVALID_PARAMETER;
|
||||
goto ErrorExit;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
@ -1030,8 +1038,9 @@ DeRegisterIdeDevice (
|
||||
// Release allocated resources
|
||||
//
|
||||
Index = IdeBlkIoDevice->Channel * 2 + IdeBlkIoDevice->Device;
|
||||
IdeBlkIoDevice->IdeBusDriverPrivateData->HaveScannedDevice[Index] = FALSE;
|
||||
|
||||
if (Index < MAX_IDE_DEVICE) {
|
||||
IdeBlkIoDevice->IdeBusDriverPrivateData->HaveScannedDevice[Index] = FALSE;
|
||||
}
|
||||
ReleaseIdeResources (IdeBlkIoDevice);
|
||||
|
||||
return EFI_SUCCESS;
|
||||
|
Reference in New Issue
Block a user