mirror of https://github.com/acidanthera/audk.git
fix null DevicePath issue.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11360 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
487ef01803
commit
e70ae46c00
|
@ -193,13 +193,16 @@ RegisterAtaDevice (
|
|||
|
||||
DevicePath = AppendDevicePathNode (AtaBusDriverData->ParentDevicePath, NewDevicePathNode);
|
||||
if (DevicePath == NULL) {
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
DeviceHandle = NULL;
|
||||
RemainingDevicePath = DevicePath;
|
||||
Status = gBS->LocateDevicePath (&gEfiDevicePathProtocolGuid, &RemainingDevicePath, &DeviceHandle);
|
||||
if (!EFI_ERROR (Status) && (DeviceHandle != NULL) && IsDevicePathEnd(RemainingDevicePath)) {
|
||||
Status = EFI_ALREADY_STARTED;
|
||||
FreePool (DevicePath);
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue