aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/pci_irq.c
diff options
context:
space:
mode:
authorBurman Yan <yan_952@hotmail.com>2006-12-19 15:56:11 -0500
committerLen Brown <len.brown@intel.com>2006-12-20 16:54:54 -0500
commit36bcbec7ce21e2e8b3143b11a05747330abeca70 (patch)
treed9ace4d83a5013dbb3cd599e7bc4358ce4cdb980 /drivers/acpi/pci_irq.c
parent5b7b4119553dd7cc0bc200c0d1b1598e158eec9a (diff)
ACPI: replace kmalloc+memset with kzalloc
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/pci_irq.c')
-rw-r--r--drivers/acpi/pci_irq.c9
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);