aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pnp/pnpacpi/rsparser.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pnp/pnpacpi/rsparser.c')
-rw-r--r--drivers/pnp/pnpacpi/rsparser.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c
index 6db549c9480c..416d30debe6c 100644
--- a/drivers/pnp/pnpacpi/rsparser.c
+++ b/drivers/pnp/pnpacpi/rsparser.c
@@ -255,7 +255,7 @@ static void pnpacpi_parse_dma_option(struct pnp_option *option, struct acpi_reso
255 255
256 if (p->number_of_channels == 0) 256 if (p->number_of_channels == 0)
257 return; 257 return;
258 dma = pnpacpi_kmalloc(sizeof(struct pnp_dma), GFP_KERNEL); 258 dma = kcalloc(1, sizeof(struct pnp_dma), GFP_KERNEL);
259 if (!dma) 259 if (!dma)
260 return; 260 return;
261 261
@@ -311,7 +311,7 @@ static void pnpacpi_parse_irq_option(struct pnp_option *option,
311 311
312 if (p->number_of_interrupts == 0) 312 if (p->number_of_interrupts == 0)
313 return; 313 return;
314 irq = pnpacpi_kmalloc(sizeof(struct pnp_irq), GFP_KERNEL); 314 irq = kcalloc(1, sizeof(struct pnp_irq), GFP_KERNEL);
315 if (!irq) 315 if (!irq)
316 return; 316 return;
317 317
@@ -332,7 +332,7 @@ static void pnpacpi_parse_ext_irq_option(struct pnp_option *option,
332 332
333 if (p->number_of_interrupts == 0) 333 if (p->number_of_interrupts == 0)
334 return; 334 return;
335 irq = pnpacpi_kmalloc(sizeof(struct pnp_irq), GFP_KERNEL); 335 irq = kcalloc(1, sizeof(struct pnp_irq), GFP_KERNEL);
336 if (!irq) 336 if (!irq)
337 return; 337 return;
338 338
@@ -353,7 +353,7 @@ pnpacpi_parse_port_option(struct pnp_option *option,
353 353
354 if (io->range_length == 0) 354 if (io->range_length == 0)
355 return; 355 return;
356 port = pnpacpi_kmalloc(sizeof(struct pnp_port), GFP_KERNEL); 356 port = kcalloc(1, sizeof(struct pnp_port), GFP_KERNEL);
357 if (!port) 357 if (!port)
358 return; 358 return;
359 port->min = io->min_base_address; 359 port->min = io->min_base_address;
@@ -374,7 +374,7 @@ pnpacpi_parse_fixed_port_option(struct pnp_option *option,
374 374
375 if (io->range_length == 0) 375 if (io->range_length == 0)
376 return; 376 return;
377 port = pnpacpi_kmalloc(sizeof(struct pnp_port), GFP_KERNEL); 377 port = kcalloc(1, sizeof(struct pnp_port), GFP_KERNEL);
378 if (!port) 378 if (!port)
379 return; 379 return;
380 port->min = port->max = io->base_address; 380 port->min = port->max = io->base_address;
@@ -393,7 +393,7 @@ pnpacpi_parse_mem24_option(struct pnp_option *option,
393 393
394 if (p->range_length == 0) 394 if (p->range_length == 0)
395 return; 395 return;
396 mem = pnpacpi_kmalloc(sizeof(struct pnp_mem), GFP_KERNEL); 396 mem = kcalloc(1, sizeof(struct pnp_mem), GFP_KERNEL);
397 if (!mem) 397 if (!mem)
398 return; 398 return;
399 mem->min = p->min_base_address; 399 mem->min = p->min_base_address;
@@ -416,7 +416,7 @@ pnpacpi_parse_mem32_option(struct pnp_option *option,
416 416
417 if (p->range_length == 0) 417 if (p->range_length == 0)
418 return; 418 return;
419 mem = pnpacpi_kmalloc(sizeof(struct pnp_mem), GFP_KERNEL); 419 mem = kcalloc(1, sizeof(struct pnp_mem), GFP_KERNEL);
420 if (!mem) 420 if (!mem)
421 return; 421 return;
422 mem->min = p->min_base_address; 422 mem->min = p->min_base_address;
@@ -439,7 +439,7 @@ pnpacpi_parse_fixed_mem32_option(struct pnp_option *option,
439 439
440 if (p->range_length == 0) 440 if (p->range_length == 0)
441 return; 441 return;
442 mem = pnpacpi_kmalloc(sizeof(struct pnp_mem), GFP_KERNEL); 442 mem = kcalloc(1, sizeof(struct pnp_mem), GFP_KERNEL);
443 if (!mem) 443 if (!mem)
444 return; 444 return;
445 mem->min = mem->max = p->range_base_address; 445 mem->min = mem->max = p->range_base_address;
@@ -623,7 +623,7 @@ int pnpacpi_build_resource_template(acpi_handle handle,
623 if (!res_cnt) 623 if (!res_cnt)
624 return -EINVAL; 624 return -EINVAL;
625 buffer->length = sizeof(struct acpi_resource) * (res_cnt + 1) + 1; 625 buffer->length = sizeof(struct acpi_resource) * (res_cnt + 1) + 1;
626 buffer->pointer = pnpacpi_kmalloc(buffer->length - 1, GFP_KERNEL); 626 buffer->pointer = kcalloc(1, buffer->length - 1, GFP_KERNEL);
627 if (!buffer->pointer) 627 if (!buffer->pointer)
628 return -ENOMEM; 628 return -ENOMEM;
629 pnp_dbg("Res cnt %d", res_cnt); 629 pnp_dbg("Res cnt %d", res_cnt);