diff options
Diffstat (limited to 'drivers/acpi/pci_irq.c')
-rw-r--r-- | drivers/acpi/pci_irq.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c index 226892eaf987..fe7d007833ad 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, | |||
89 | if (!prt) | 89 | if (!prt) |
90 | return -EINVAL; | 90 | return -EINVAL; |
91 | 91 | ||
92 | entry = kmalloc(sizeof(struct acpi_prt_entry), GFP_KERNEL); | 92 | entry = kzalloc(sizeof(struct acpi_prt_entry), GFP_KERNEL); |
93 | if (!entry) | 93 | if (!entry) |
94 | return -ENOMEM; | 94 | return -ENOMEM; |
95 | memset(entry, 0, sizeof(struct acpi_prt_entry)); | ||
96 | 95 | ||
97 | entry->id.segment = segment; | 96 | entry->id.segment = segment; |
98 | entry->id.bus = bus; | 97 | entry->id.bus = bus; |
@@ -161,10 +160,9 @@ int acpi_pci_irq_add_prt(acpi_handle handle, int segment, int bus) | |||
161 | static int first_time = 1; | 160 | static int first_time = 1; |
162 | 161 | ||
163 | 162 | ||
164 | pathname = kmalloc(ACPI_PATHNAME_MAX, GFP_KERNEL); | 163 | pathname = kzalloc(ACPI_PATHNAME_MAX, GFP_KERNEL); |
165 | if (!pathname) | 164 | if (!pathname) |
166 | return -ENOMEM; | 165 | return -ENOMEM; |
167 | memset(pathname, 0, ACPI_PATHNAME_MAX); | ||
168 | 166 | ||
169 | if (first_time) { | 167 | if (first_time) { |
170 | acpi_prt.count = 0; | 168 | acpi_prt.count = 0; |
@@ -198,11 +196,10 @@ int acpi_pci_irq_add_prt(acpi_handle handle, int segment, int bus) | |||
198 | return -ENODEV; | 196 | return -ENODEV; |
199 | } | 197 | } |
200 | 198 | ||
201 | prt = kmalloc(buffer.length, GFP_KERNEL); | 199 | prt = kzalloc(buffer.length, GFP_KERNEL); |
202 | if (!prt) { | 200 | if (!prt) { |
203 | return -ENOMEM; | 201 | return -ENOMEM; |
204 | } | 202 | } |
205 | memset(prt, 0, buffer.length); | ||
206 | buffer.pointer = prt; | 203 | buffer.pointer = prt; |
207 | 204 | ||
208 | status = acpi_get_irq_routing_table(handle, &buffer); | 205 | status = acpi_get_irq_routing_table(handle, &buffer); |