Platform/ARM: Fix Ecc error 3003

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.Gondois@arm.com>
Reviewed-by: Chris Jones <christopher.jones@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
This commit is contained in:
Pierre Gondois
2021-10-26 14:00:10 +01:00
committed by Sami Mujawar
parent 8a77dc7243
commit f4527e297a
2 changed files with 3 additions and 3 deletions

View File

@@ -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;
}

View File

@@ -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));
}