From d10a41e634cad5230e6ec53ebb3d22f636eeaa8a Mon Sep 17 00:00:00 2001 From: erictian Date: Tue, 2 Feb 2010 00:48:19 +0000 Subject: when remaining device path is not NULL, check if it's the device managed by bus driver. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9904 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'MdeModulePkg') diff --git a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c index e0d35b7550..eaa4658e35 100644 --- a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c +++ b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c @@ -429,11 +429,14 @@ SCSIBusDriverBindingStart ( // only scan the specified device by RemainingDevicePath // if (ScsiBusDev->ExtScsiSupport) { - ScsiBusDev->ExtScsiInterface->GetTargetLun (ScsiBusDev->ExtScsiInterface, RemainingDevicePath, &TargetId, &Lun); + Status = ScsiBusDev->ExtScsiInterface->GetTargetLun (ScsiBusDev->ExtScsiInterface, RemainingDevicePath, &TargetId, &Lun); } else { - ScsiBusDev->ScsiInterface->GetTargetLun (ScsiBusDev->ScsiInterface, RemainingDevicePath, &ScsiTargetId.ScsiId.Scsi, &Lun); + Status = ScsiBusDev->ScsiInterface->GetTargetLun (ScsiBusDev->ScsiInterface, RemainingDevicePath, &ScsiTargetId.ScsiId.Scsi, &Lun); } + if (EFI_ERROR (Status)) { + return Status; + } } else { // // If RemainingDevicePath is the End of Device Path Node, -- cgit v1.2.3