Skip to content

Commit

Permalink
ia64/PCI: Clear host bridge aperture struct resource
Browse files Browse the repository at this point in the history
Use kzalloc() so the struct resource doesn't contain garbage in
fields we don't initialize.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: linux-ia64@vger.kernel.org
  • Loading branch information
Yinghai Lu authored and Bjorn Helgaas committed Sep 21, 2012
1 parent 4cd8daf commit da10491
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arch/ia64/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,6 @@ static __devinit acpi_status add_window(struct acpi_resource *res, void *data)
window->resource.flags = flags;
window->resource.start = addr.minimum + offset;
window->resource.end = window->resource.start + addr.address_length - 1;
window->resource.child = NULL;
window->offset = offset;

if (insert_resource(root, &window->resource)) {
Expand Down Expand Up @@ -357,7 +356,7 @@ pci_acpi_scan_root(struct acpi_pci_root *root)
&windows);
if (windows) {
controller->window =
kmalloc_node(sizeof(*controller->window) * windows,
kzalloc_node(sizeof(*controller->window) * windows,
GFP_KERNEL, controller->node);
if (!controller->window)
goto out2;
Expand Down

0 comments on commit da10491

Please sign in to comment.