[PATCH 1/3] acpi: hpet: fwts_mmap failure is FWTS_MAP_FAILED and not NULL

Colin King colin.king at canonical.com
Wed Dec 23 01:42:50 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/hpet/hpet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/acpi/hpet/hpet.c b/src/acpi/hpet/hpet.c
index d3380a3..7fd94c1 100644
--- a/src/acpi/hpet/hpet.c
+++ b/src/acpi/hpet/hpet.c
@@ -412,7 +412,7 @@ static int hpet_check_test4(fwts_framework *fw)
 	}
 
 	hpet_base_v = fwts_mmap(hpet_base_p, HPET_REG_SIZE);
-	if (hpet_base_v == NULL) {
+	if (hpet_base_v == FWTS_MAP_FAILED) {
 		fwts_log_error(fw, "Cannot mmap to /dev/mem.");
 		return FWTS_ERROR;
 	}
-- 
2.6.4




More information about the fwts-devel mailing list