]> Pileus Git - ~andy/linux/commitdiff
ia64/PCI: Clear host bridge aperture struct resource
authorYinghai Lu <yinghai@kernel.org>
Wed, 19 Sep 2012 18:54:17 +0000 (11:54 -0700)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 21 Sep 2012 20:56:01 +0000 (14:56 -0600)
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
arch/ia64/pci/pci.c

index 81acc7a57f3e1e48cb364ed34c3a6ecf69710f89..8da4670b6ce9c8333b9346c34fdc4799046963d8 100644 (file)
@@ -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)) {
@@ -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;