From: "Ranbir Singh" <Ranbir.Singh3@Dell.com>
To: gaoliming <gaoliming@byosoft.com.cn>,devel@edk2.groups.io
Subject: Re: [edk2-devel] 回复: [edk2-devel] [PATCH] MdeModulePkg/Bus/Ata/AhciPei: Fix DEADCODE Coverity issue
Date: Tue, 03 Jan 2023 20:49:04 -0800 [thread overview]
Message-ID: <24482.1672807744947948481@groups.io> (raw)
In-Reply-To: <019301d91bef$32204690$9660d3b0$@byosoft.com.cn>
[-- Attachment #1: Type: text/plain, Size: 851 bytes --]
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
[-- Attachment #2: Type: text/html, Size: 1272 bytes --]
prev parent reply other threads:[~2023-01-04 4:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Ranbir Singh [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=24482.1672807744947948481@groups.io \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox