Logically, the while loop that contains ScsiScanCreateDevice() should
continue regardless what the returned Status is, because the purpose of
the while loop is to scan all possible Puns in the SCSI channel.

Without this fix, some static analyzer may complain about the unused
return value.

Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org>
Cc: Liming Gao <gaolim...@byosoft.com.cn>
Cc: Hao A Wu <hao.a...@intel.com>
Cc: Ray Ni <ray...@intel.com>
Cc: Sivaparvathi chellaiah <sivaparvat...@ami.com>

Signed-off-by: Yuan Yu <yua...@google.com>
---
 MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c 
b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c
index 2ed816da4abe..7f133253a256 100644
--- a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c
+++ b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c
@@ -532,7 +532,7 @@ SCSIBusDriverBindingStart (
     // Scan for the scsi device, if it attaches to the scsi bus,
     // then create handle and install scsi i/o protocol.
     //
-    Status = ScsiScanCreateDevice (This, Controller, &ScsiTargetId, Lun, 
ScsiBusDev);
+    ScsiScanCreateDevice (This, Controller, &ScsiTargetId, Lun, ScsiBusDev);
   }
 
   return EFI_SUCCESS;
-- 
2.39.0.314.g84b9a713c41-goog



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#98785): https://edk2.groups.io/g/devel/message/98785
Mute This Topic: https://groups.io/mt/96350423/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to