when remaining device path is not NULL, check if it's the device managed by bus driver.
authorerictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 2 Feb 2010 00:48:19 +0000 (00:48 +0000)
committererictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 2 Feb 2010 00:48:19 +0000 (00:48 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9904 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c

index e0d35b755043e41257fcd918d2e7b8cce70ab5b8..eaa4658e35813e8c0f670d8e095ff8bc07802345 100644 (file)
@@ -429,11 +429,14 @@ SCSIBusDriverBindingStart (
     // only scan the specified device by RemainingDevicePath\r
     //\r
     if (ScsiBusDev->ExtScsiSupport) {\r
-      ScsiBusDev->ExtScsiInterface->GetTargetLun (ScsiBusDev->ExtScsiInterface, RemainingDevicePath, &TargetId, &Lun);  \r
+      Status = ScsiBusDev->ExtScsiInterface->GetTargetLun (ScsiBusDev->ExtScsiInterface, RemainingDevicePath, &TargetId, &Lun);  \r
     } else {\r
-      ScsiBusDev->ScsiInterface->GetTargetLun (ScsiBusDev->ScsiInterface, RemainingDevicePath, &ScsiTargetId.ScsiId.Scsi, &Lun);\r
+      Status = ScsiBusDev->ScsiInterface->GetTargetLun (ScsiBusDev->ScsiInterface, RemainingDevicePath, &ScsiTargetId.ScsiId.Scsi, &Lun);\r
     }\r
 \r
+    if (EFI_ERROR (Status)) {\r
+      return Status;\r
+    }\r
   } else {\r
     //\r
     // If RemainingDevicePath is the End of Device Path Node,\r