X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Facpi%2Fpci_irq.c;h=fe7d007833ade1b03ba2660269bcd10d42440c54;hb=1fcb71b84b05ff3bfd5b5b2eca9a9b3d13a76e3a;hp=feda0341f5a73b5a921c6d858de94bf9babfbc4b;hpb=db1a19b38f3a85f475b4ad716c71be133d8ca48e;p=linux-2.6 diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c index feda0341f5..fe7d007833 100644 --- a/drivers/acpi/pci_irq.c +++ b/drivers/acpi/pci_irq.c @@ -89,10 +89,9 @@ acpi_pci_irq_add_entry(acpi_handle handle, if (!prt) return -EINVAL; - entry = kmalloc(sizeof(struct acpi_prt_entry), GFP_KERNEL); + entry = kzalloc(sizeof(struct acpi_prt_entry), GFP_KERNEL); if (!entry) return -ENOMEM; - memset(entry, 0, sizeof(struct acpi_prt_entry)); entry->id.segment = segment; entry->id.bus = bus; @@ -161,10 +160,9 @@ int acpi_pci_irq_add_prt(acpi_handle handle, int segment, int bus) static int first_time = 1; - pathname = (char *)kmalloc(ACPI_PATHNAME_MAX, GFP_KERNEL); + pathname = kzalloc(ACPI_PATHNAME_MAX, GFP_KERNEL); if (!pathname) return -ENOMEM; - memset(pathname, 0, ACPI_PATHNAME_MAX); if (first_time) { acpi_prt.count = 0; @@ -198,11 +196,10 @@ int acpi_pci_irq_add_prt(acpi_handle handle, int segment, int bus) return -ENODEV; } - prt = kmalloc(buffer.length, GFP_KERNEL); + prt = kzalloc(buffer.length, GFP_KERNEL); if (!prt) { return -ENOMEM; } - memset(prt, 0, buffer.length); buffer.pointer = prt; status = acpi_get_irq_routing_table(handle, &buffer);