ACPICA: Check for non-zero address before being converted to GAS
authorLin Ming <ming.m.lin@intel.com>
Wed, 4 Mar 2009 06:31:25 +0000 (14:31 +0800)
committerLen Brown <len.brown@intel.com>
Thu, 26 Mar 2009 20:38:23 +0000 (16:38 -0400)
Reported-by: FreeBSD community
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/acpica/tbfadt.c

index a8191efd9aa6bc0b47bc744193e39c0b8d38f6b4..43fe886b41a2571672a7eeadfa0119ec3303a025 100644 (file)
@@ -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));
+               }
        }
 }