Hi All,
The attached patch fixes the DEADCODE issue in MdeModulePkg/Bus/Ata/AhciPei.
Please review.
Best Regards,
Ranbir Singh
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#97760): https://edk2.groups.io/g/devel/message/97760
Mute This Topic: https://groups.io/mt/95897177/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
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
Ranbir: This change is good. Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn> Thanks Liming 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Ranbir Singh via groups.io 发送时间: 2022年12月22日 18:06 收件人: devel@edk2.groups.io 主题: [edk2-devel] [PATCH] MdeModulePkg/Bus/Ata/AhciPei: Fix DEADCODE Coverity issue Hi All, The attached patch fixes the DEADCODE issue in MdeModulePkg/Bus/Ata/AhciPei. Please review. Best Regards, Ranbir Singh -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#97816): https://edk2.groups.io/g/devel/message/97816 Mute This Topic: https://groups.io/mt/95947546/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
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. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4201 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 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#97910): https://edk2.groups.io/g/devel/message/97910 Mute This Topic: https://groups.io/mt/95947546/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2024 Red Hat, Inc.