public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] MdeModulePkg/Bus/Ata/AhciPei: Fix DEADCODE Coverity issue
@ 2022-12-22 10:05 Ranbir.Singh3
  2022-12-30  1:36 ` 回复: [edk2-devel] " gaoliming
  0 siblings, 1 reply; 3+ messages in thread
From: Ranbir.Singh3 @ 2022-12-22 10:05 UTC (permalink / raw)
  To: devel


[-- Attachment #1.1: Type: text/plain, Size: 139 bytes --]

Hi All,

The attached patch fixes the DEADCODE issue in MdeModulePkg/Bus/Ata/AhciPei.

Please review.

Best Regards,
Ranbir Singh

[-- Attachment #1.2: Type: text/html, Size: 171 bytes --]

[-- Attachment #2: 0001-MdeModulePkg-Bus-Ata-AhciPei-Fix-DEADCODE-Coverity-i.patch --]
[-- Type: text/plain, Size: 1082 bytes --]

From 10175e59ad725db9f499b6f57ab43524c624715c Mon Sep 17 00:00:00 2001
From: Ranbir Singh <Ranbir.Singh3@Dell.com>
Date: Thu, 22 Dec 2022 13:42:39 +0530
Subject: [PATCH] MdeModulePkg/Bus/Ata/AhciPei: Fix DEADCODE Coverity issue

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>
---
 MdeModulePkg/Bus/Ata/AhciPei/AhciPeiS3.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiS3.c b/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiS3.c
index 42e4203a22..6013af858d 100644
--- a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiS3.c
+++ b/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiS3.c
@@ -66,10 +66,6 @@ AhciS3GetEumeratePorts (
     }
   }
 
-  if (S3InitDevices == NULL) {
-    return 0;
-  }
-
   //
   // Only enumerate the ports that exist in the device list.
   //
-- 
2.36.1.windows.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-01-04  4:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-22 10:05 [PATCH] MdeModulePkg/Bus/Ata/AhciPei: Fix DEADCODE Coverity issue Ranbir.Singh3
2022-12-30  1:36 ` 回复: [edk2-devel] " gaoliming
2023-01-04  4:49   ` [edk2-devel] " Ranbir Singh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox