diff options
author | Yinghai Lu <yinghai@kernel.org> | 2012-09-19 13:49:00 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2012-09-21 16:52:28 -0400 |
commit | 4cd8daf05c7071ac80008c8d4368860110fa6466 (patch) | |
tree | e42fcea6f27656e321309d13b49468a140283916 /arch/x86/pci | |
parent | 817a268516f3aaf9e54c5a0f880de37d03ef4c79 (diff) |
x86/PCI: Clear host bridge aperture struct resource
Use kzalloc() so the struct resource doesn't contain garbage in
fields we don't initialize.
[bhelgaas: changelog]
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: x86@kernel.org
Diffstat (limited to 'arch/x86/pci')
-rw-r--r-- | arch/x86/pci/acpi.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c index 505acdd6d600..192397c98606 100644 --- a/arch/x86/pci/acpi.c +++ b/arch/x86/pci/acpi.c | |||
@@ -305,7 +305,6 @@ setup_resource(struct acpi_resource *acpi_res, void *data) | |||
305 | res->flags = flags; | 305 | res->flags = flags; |
306 | res->start = start; | 306 | res->start = start; |
307 | res->end = end; | 307 | res->end = end; |
308 | res->child = NULL; | ||
309 | 308 | ||
310 | if (!pci_use_crs) { | 309 | if (!pci_use_crs) { |
311 | dev_printk(KERN_DEBUG, &info->bridge->dev, | 310 | dev_printk(KERN_DEBUG, &info->bridge->dev, |
@@ -434,7 +433,7 @@ probe_pci_root_info(struct pci_root_info *info, struct acpi_device *device, | |||
434 | 433 | ||
435 | size = sizeof(*info->res) * info->res_num; | 434 | size = sizeof(*info->res) * info->res_num; |
436 | info->res_num = 0; | 435 | info->res_num = 0; |
437 | info->res = kmalloc(size, GFP_KERNEL); | 436 | info->res = kzalloc(size, GFP_KERNEL); |
438 | if (!info->res) | 437 | if (!info->res) |
439 | return; | 438 | return; |
440 | 439 | ||