From: Pierre Gondois <pierre.gond...@arm.com>

This patch fixes the following Ecc reported error:
A comparison of any pointer to zero must be done
via the NULL type

Signed-off-by: Pierre Gondois <pierre.gond...@arm.com>
---
 Platform/ARM/JunoPkg/Drivers/SataSiI3132Dxe/SataSiI3132.c     | 4 ++--
 .../ARM/JunoPkg/Drivers/SataSiI3132Dxe/SiI3132AtaPassThru.c   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Platform/ARM/JunoPkg/Drivers/SataSiI3132Dxe/SataSiI3132.c 
b/Platform/ARM/JunoPkg/Drivers/SataSiI3132Dxe/SataSiI3132.c
index ad7cc1cd75a1..6f2ce401b3cc 100644
--- a/Platform/ARM/JunoPkg/Drivers/SataSiI3132Dxe/SataSiI3132.c
+++ b/Platform/ARM/JunoPkg/Drivers/SataSiI3132Dxe/SataSiI3132.c
@@ -91,7 +91,7 @@ SataSiI3132Constructor (
   SATA_SI3132_INSTANCE    *Instance;
   EFI_ATA_PASS_THRU_MODE  *AtaPassThruMode;

-  if (!SataSiI3132Instance) {
+  if (SataSiI3132Instance == NULL) {
     return EFI_INVALID_PARAMETER;
   }

@@ -223,7 +223,7 @@ SataSiI3132Initialization (
   UINTN                 Index;
   EFI_PCI_IO_PROTOCOL*  PciIo;

-  if (!SataSiI3132Instance) {
+  if (SataSiI3132Instance == NULL) {
     return EFI_INVALID_PARAMETER;
   }

diff --git a/Platform/ARM/JunoPkg/Drivers/SataSiI3132Dxe/SiI3132AtaPassThru.c 
b/Platform/ARM/JunoPkg/Drivers/SataSiI3132Dxe/SiI3132AtaPassThru.c
index f15b59788310..0ec53782835b 100644
--- a/Platform/ARM/JunoPkg/Drivers/SataSiI3132Dxe/SiI3132AtaPassThru.c
+++ b/Platform/ARM/JunoPkg/Drivers/SataSiI3132Dxe/SiI3132AtaPassThru.c
@@ -260,7 +260,7 @@ SiI3132AtaPassThruCommand (
     // Clear Command Complete
     SATA_PORT_WRITE32 (SataPort->RegBase + SII3132_PORT_INTSTATUS_REG, 
SII3132_PORT_INT_CMDCOMPL << 16);

-    if (PciAllocMapping) {
+    if (PciAllocMapping != NULL) {
       Status = PciIo->Unmap (PciIo, PciAllocMapping);
       ASSERT (!EFI_ERROR (Status));
     }
--
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#84051): https://edk2.groups.io/g/devel/message/84051
Mute This Topic: https://groups.io/mt/87284493/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to