diff options
Diffstat (limited to 'drivers/pnp/pnpacpi/rsparser.c')
| -rw-r--r-- | drivers/pnp/pnpacpi/rsparser.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c index 75575f6c349c..675b76a42403 100644 --- a/drivers/pnp/pnpacpi/rsparser.c +++ b/drivers/pnp/pnpacpi/rsparser.c | |||
| @@ -244,7 +244,7 @@ static void pnpacpi_parse_dma_option(struct pnp_option *option, struct acpi_reso | |||
| 244 | 244 | ||
| 245 | if (p->number_of_channels == 0) | 245 | if (p->number_of_channels == 0) |
| 246 | return; | 246 | return; |
| 247 | dma = pnpacpi_kmalloc(sizeof(struct pnp_dma), GFP_KERNEL); | 247 | dma = kcalloc(1, sizeof(struct pnp_dma), GFP_KERNEL); |
| 248 | if (!dma) | 248 | if (!dma) |
| 249 | return; | 249 | return; |
| 250 | 250 | ||
| @@ -300,7 +300,7 @@ static void pnpacpi_parse_irq_option(struct pnp_option *option, | |||
| 300 | 300 | ||
| 301 | if (p->number_of_interrupts == 0) | 301 | if (p->number_of_interrupts == 0) |
| 302 | return; | 302 | return; |
| 303 | irq = pnpacpi_kmalloc(sizeof(struct pnp_irq), GFP_KERNEL); | 303 | irq = kcalloc(1, sizeof(struct pnp_irq), GFP_KERNEL); |
| 304 | if (!irq) | 304 | if (!irq) |
| 305 | return; | 305 | return; |
| 306 | 306 | ||
| @@ -321,7 +321,7 @@ static void pnpacpi_parse_ext_irq_option(struct pnp_option *option, | |||
| 321 | 321 | ||
| 322 | if (p->number_of_interrupts == 0) | 322 | if (p->number_of_interrupts == 0) |
| 323 | return; | 323 | return; |
| 324 | irq = pnpacpi_kmalloc(sizeof(struct pnp_irq), GFP_KERNEL); | 324 | irq = kcalloc(1, sizeof(struct pnp_irq), GFP_KERNEL); |
| 325 | if (!irq) | 325 | if (!irq) |
| 326 | return; | 326 | return; |
| 327 | 327 | ||
| @@ -342,7 +342,7 @@ pnpacpi_parse_port_option(struct pnp_option *option, | |||
| 342 | 342 | ||
| 343 | if (io->range_length == 0) | 343 | if (io->range_length == 0) |
| 344 | return; | 344 | return; |
| 345 | port = pnpacpi_kmalloc(sizeof(struct pnp_port), GFP_KERNEL); | 345 | port = kcalloc(1, sizeof(struct pnp_port), GFP_KERNEL); |
| 346 | if (!port) | 346 | if (!port) |
| 347 | return; | 347 | return; |
| 348 | port->min = io->min_base_address; | 348 | port->min = io->min_base_address; |
| @@ -363,7 +363,7 @@ pnpacpi_parse_fixed_port_option(struct pnp_option *option, | |||
| 363 | 363 | ||
| 364 | if (io->range_length == 0) | 364 | if (io->range_length == 0) |
| 365 | return; | 365 | return; |
| 366 | port = pnpacpi_kmalloc(sizeof(struct pnp_port), GFP_KERNEL); | 366 | port = kcalloc(1, sizeof(struct pnp_port), GFP_KERNEL); |
| 367 | if (!port) | 367 | if (!port) |
| 368 | return; | 368 | return; |
| 369 | port->min = port->max = io->base_address; | 369 | port->min = port->max = io->base_address; |
| @@ -382,7 +382,7 @@ pnpacpi_parse_mem24_option(struct pnp_option *option, | |||
| 382 | 382 | ||
| 383 | if (p->range_length == 0) | 383 | if (p->range_length == 0) |
| 384 | return; | 384 | return; |
| 385 | mem = pnpacpi_kmalloc(sizeof(struct pnp_mem), GFP_KERNEL); | 385 | mem = kcalloc(1, sizeof(struct pnp_mem), GFP_KERNEL); |
| 386 | if (!mem) | 386 | if (!mem) |
| 387 | return; | 387 | return; |
| 388 | mem->min = p->min_base_address; | 388 | mem->min = p->min_base_address; |
| @@ -405,7 +405,7 @@ pnpacpi_parse_mem32_option(struct pnp_option *option, | |||
| 405 | 405 | ||
| 406 | if (p->range_length == 0) | 406 | if (p->range_length == 0) |
| 407 | return; | 407 | return; |
| 408 | mem = pnpacpi_kmalloc(sizeof(struct pnp_mem), GFP_KERNEL); | 408 | mem = kcalloc(1, sizeof(struct pnp_mem), GFP_KERNEL); |
| 409 | if (!mem) | 409 | if (!mem) |
| 410 | return; | 410 | return; |
| 411 | mem->min = p->min_base_address; | 411 | mem->min = p->min_base_address; |
| @@ -428,7 +428,7 @@ pnpacpi_parse_fixed_mem32_option(struct pnp_option *option, | |||
| 428 | 428 | ||
| 429 | if (p->range_length == 0) | 429 | if (p->range_length == 0) |
| 430 | return; | 430 | return; |
| 431 | mem = pnpacpi_kmalloc(sizeof(struct pnp_mem), GFP_KERNEL); | 431 | mem = kcalloc(1, sizeof(struct pnp_mem), GFP_KERNEL); |
| 432 | if (!mem) | 432 | if (!mem) |
| 433 | return; | 433 | return; |
| 434 | mem->min = mem->max = p->range_base_address; | 434 | mem->min = mem->max = p->range_base_address; |
| @@ -612,7 +612,7 @@ int pnpacpi_build_resource_template(acpi_handle handle, | |||
| 612 | if (!res_cnt) | 612 | if (!res_cnt) |
| 613 | return -EINVAL; | 613 | return -EINVAL; |
| 614 | buffer->length = sizeof(struct acpi_resource) * (res_cnt + 1) + 1; | 614 | buffer->length = sizeof(struct acpi_resource) * (res_cnt + 1) + 1; |
| 615 | buffer->pointer = pnpacpi_kmalloc(buffer->length - 1, GFP_KERNEL); | 615 | buffer->pointer = kcalloc(1, buffer->length - 1, GFP_KERNEL); |
| 616 | if (!buffer->pointer) | 616 | if (!buffer->pointer) |
| 617 | return -ENOMEM; | 617 | return -ENOMEM; |
| 618 | pnp_dbg("Res cnt %d", res_cnt); | 618 | pnp_dbg("Res cnt %d", res_cnt); |
