[PATCH 2/3] acpi: pcc: fwts_mmap failure is FWTS_MAP_FAILED and not NULL
Colin King
colin.king at canonical.com
Wed Dec 23 01:42:51 UTC 2015
From: Colin Ian King <colin.king at canonical.com>
Should be checking for FWTS_MAP_FAILED on a failed fwts_mmap and not
a NULL
Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
src/acpi/pcc/pcc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/acpi/pcc/pcc.c b/src/acpi/pcc/pcc.c
index da66aec..799e773 100644
--- a/src/acpi/pcc/pcc.c
+++ b/src/acpi/pcc/pcc.c
@@ -110,7 +110,7 @@ static void pcc_check_pcc_header(
fwts_pcc_header *hdr;
hdr = (fwts_pcc_header *)fwts_mmap((off_t)addr, (size_t)length);
- if (hdr == NULL) {
+ if (hdr == FWTS_MAP_FAILED) {
fwts_log_info(fw, "Failed to memory map PCC header 0x%" PRIx64
"..0x%" PRIx64 ".", addr, addr + length);
return;
--
2.6.4
More information about the fwts-devel
mailing list