From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: =?UTF-8?B?UmU6IFtlZGsyLWRldmVsXSDlm57lpI06IFtlZGsyLWRldmVsXSBbUEFUQ0hdIE1kZU1vZHVsZVBrZy9CdXMvQXRhL0FoY2lQZWk6IEZpeCBERUFEQ09ERSBDb3Zlcml0eSBpc3N1ZQ==?= To: gaoliming ,devel@edk2.groups.io From: "Ranbir Singh" X-Originating-Location: Bengaluru, Karnataka, IN (122.172.85.38) X-Originating-Platform: Windows Chrome 108 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Tue, 03 Jan 2023 20:49:04 -0800 References: <019301d91bef$32204690$9660d3b0$@byosoft.com.cn> In-Reply-To: <019301d91bef$32204690$9660d3b0$@byosoft.com.cn> Message-ID: <24482.1672807744947948481@groups.io> Content-Type: multipart/alternative; boundary="J5HROKPYZHhILLczEBra" --J5HROKPYZHhILLczEBra Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=3D4201 Signed-off-by: Ranbir Singh --- MdeModulePkg/Bus/Ata/AhciPei/AhciPeiS3.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiS3.c b/MdeModulePkg/Bus/At= a/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 ( } } -=C2=A0 if (S3InitDevices =3D=3D NULL) { -=C2=A0 =C2=A0 return 0; -=C2=A0 } - // // Only enumerate the ports that exist in the device list. // -- 2.36.1.windows.1 --J5HROKPYZHhILLczEBra Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
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=3D4201
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/B= us/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 =3D=3D NULL) {
-    return 0;
-  }
-
   //
   // Only enumerate the ports that exist in the device list= .
   //
--
2.36.1.windows.1
--J5HROKPYZHhILLczEBra--