Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4cd8daf0 authored by Yinghai Lu's avatar Yinghai Lu Committed by Bjorn Helgaas
Browse files

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: default avatarYinghai Lu <yinghai@kernel.org>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Cc: x86@kernel.org
parent 817a2685
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -305,7 +305,6 @@ setup_resource(struct acpi_resource *acpi_res, void *data)
	res->flags = flags;
	res->start = start;
	res->end = end;
	res->child = NULL;

	if (!pci_use_crs) {
		dev_printk(KERN_DEBUG, &info->bridge->dev,
@@ -434,7 +433,7 @@ probe_pci_root_info(struct pci_root_info *info, struct acpi_device *device,

	size = sizeof(*info->res) * info->res_num;
	info->res_num = 0;
	info->res = kmalloc(size, GFP_KERNEL);
	info->res = kzalloc(size, GFP_KERNEL);
	if (!info->res)
		return;