summaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorLin Ming <ming.m.lin@intel.com>2009-03-04 14:31:25 +0800
committerLen Brown <len.brown@intel.com>2009-03-26 16:38:23 -0400
commit5e053e77f233342b56fda419d347fd2c958b9849 (patch)
treefad2031c0c0c60498f671d99dc9bbaf3a65ac734 /drivers/acpi
parent531c633d2be8e79087335a46d3c017ca5837e588 (diff)
downloadlinux-5e053e77f233342b56fda419d347fd2c958b9849.tar.gz
linux-5e053e77f233342b56fda419d347fd2c958b9849.tar.bz2
linux-5e053e77f233342b56fda419d347fd2c958b9849.zip
ACPICA: Check for non-zero address before being converted to GAS
Reported-by: FreeBSD community Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/acpica/tbfadt.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/acpi/acpica/tbfadt.c b/drivers/acpi/acpica/tbfadt.c
index a8191efd9aa6..43fe886b41a2 100644
--- a/drivers/acpi/acpica/tbfadt.c
+++ b/drivers/acpi/acpica/tbfadt.c
@@ -618,12 +618,14 @@ static void acpi_tb_setup_fadt_registers(void)
ACPI_ADD_PTR(struct acpi_generic_address, &acpi_gbl_FADT,
fadt_pm_info_table[i].source);
- acpi_tb_init_generic_address(fadt_pm_info_table[i].target,
- source64->space_id,
- pm1_register_byte_width,
- source64->address +
- (fadt_pm_info_table[i].
- register_num *
- pm1_register_byte_width));
+ if (source64->address) {
+ acpi_tb_init_generic_address(fadt_pm_info_table[i].
+ target, source64->space_id,
+ pm1_register_byte_width,
+ source64->address +
+ (fadt_pm_info_table[i].
+ register_num *
+ pm1_register_byte_width));
+ }
}
}