Message ID | 1450834972-22066-2-git-send-email-colin.king@canonical.com |
---|---|
State | Accepted |
Headers | show |
On 2015-12-23 09:42 AM, Colin King wrote: > From: Colin Ian King <colin.king@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@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; > } > Acked-by: Alex Hung <alex.hung@canonical.com>
On 2015年12月23日 09:42, Colin King wrote: > From: Colin Ian King <colin.king@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@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; > } > Acked-by: Ivan Hu <ivan.hu@canonical.com>
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; }