]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/Bus/Ata/AhciPei: Fix DEADCODE Coverity issue
authorRanbir Singh <Ranbir.Singh3@Dell.com>
Thu, 22 Dec 2022 08:12:39 +0000 (13:42 +0530)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 2 Feb 2023 03:50:28 +0000 (03:50 +0000)
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4201

The code can reach line 69 only through the else path above at line 57.
The else path already has the same NULL check at line 59 and hence the
duplicate code lines are totally redundant which can be deleted.

Signed-off-by: Ranbir Singh <Ranbir.Singh3@Dell.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
MdeModulePkg/Bus/Ata/AhciPei/AhciPeiS3.c

index 42e4203a22984c627b01085dd22e26c7eae6eedc..6013af858d5609a305b8329d043eb506d6039f17 100644 (file)
@@ -66,10 +66,6 @@ AhciS3GetEumeratePorts (
     }\r
   }\r
 \r
-  if (S3InitDevices == NULL) {\r
-    return 0;\r
-  }\r
-\r
   //\r
   // Only enumerate the ports that exist in the device list.\r
   //\r