aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ata/pdc_adma.c4
-rw-r--r--drivers/macintosh/smu.c2
-rw-r--r--drivers/mtd/rfd_ftl.c2
-rw-r--r--drivers/net/phy/phy_device.c2
-rw-r--r--drivers/net/skge.c2
-rw-r--r--drivers/pcmcia/at91_cf.c2
-rw-r--r--drivers/pcmcia/omap_cf.c2
-rw-r--r--drivers/pnp/isapnp/core.c22
-rw-r--r--drivers/pnp/pnpacpi/core.c6
-rw-r--r--drivers/pnp/pnpacpi/rsparser.c22
-rw-r--r--drivers/pnp/pnpbios/core.c14
-rw-r--r--drivers/pnp/pnpbios/proc.c8
-rw-r--r--drivers/pnp/pnpbios/rsparser.c16
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_hipd.c2
-rw-r--r--drivers/usb/gadget/at91_udc.c2
-rw-r--r--drivers/usb/misc/uss720.c2
-rw-r--r--drivers/usb/net/rndis_host.c2
17 files changed, 56 insertions, 56 deletions
diff --git a/drivers/ata/pdc_adma.c b/drivers/ata/pdc_adma.c
index 9021e34d2096..90786d7a20bb 100644
--- a/drivers/ata/pdc_adma.c
+++ b/drivers/ata/pdc_adma.c
@@ -551,7 +551,7 @@ static int adma_port_start(struct ata_port *ap)
551 return rc; 551 return rc;
552 adma_enter_reg_mode(ap); 552 adma_enter_reg_mode(ap);
553 rc = -ENOMEM; 553 rc = -ENOMEM;
554 pp = kcalloc(1, sizeof(*pp), GFP_KERNEL); 554 pp = kzalloc(sizeof(*pp), GFP_KERNEL);
555 if (!pp) 555 if (!pp)
556 goto err_out; 556 goto err_out;
557 pp->pkt = dma_alloc_coherent(dev, ADMA_PKT_BYTES, &pp->pkt_dma, 557 pp->pkt = dma_alloc_coherent(dev, ADMA_PKT_BYTES, &pp->pkt_dma,
@@ -672,7 +672,7 @@ static int adma_ata_init_one(struct pci_dev *pdev,
672 if (rc) 672 if (rc)
673 goto err_out_iounmap; 673 goto err_out_iounmap;
674 674
675 probe_ent = kcalloc(1, sizeof(*probe_ent), GFP_KERNEL); 675 probe_ent = kzalloc(sizeof(*probe_ent), GFP_KERNEL);
676 if (probe_ent == NULL) { 676 if (probe_ent == NULL) {
677 rc = -ENOMEM; 677 rc = -ENOMEM;
678 goto err_out_iounmap; 678 goto err_out_iounmap;
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c
index 6dde27ab79a8..6f30459b9385 100644
--- a/drivers/macintosh/smu.c
+++ b/drivers/macintosh/smu.c
@@ -945,7 +945,7 @@ static struct smu_sdbp_header *smu_create_sdb_partition(int id)
945 */ 945 */
946 tlen = sizeof(struct property) + len + 18; 946 tlen = sizeof(struct property) + len + 18;
947 947
948 prop = kcalloc(tlen, 1, GFP_KERNEL); 948 prop = kzalloc(tlen, GFP_KERNEL);
949 if (prop == NULL) 949 if (prop == NULL)
950 return NULL; 950 return NULL;
951 hdr = (struct smu_sdbp_header *)(prop + 1); 951 hdr = (struct smu_sdbp_header *)(prop + 1);
diff --git a/drivers/mtd/rfd_ftl.c b/drivers/mtd/rfd_ftl.c
index fa4362fb4dd8..0f3baa5d9c2a 100644
--- a/drivers/mtd/rfd_ftl.c
+++ b/drivers/mtd/rfd_ftl.c
@@ -768,7 +768,7 @@ static void rfd_ftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
768 if (mtd->type != MTD_NORFLASH) 768 if (mtd->type != MTD_NORFLASH)
769 return; 769 return;
770 770
771 part = kcalloc(1, sizeof(struct partition), GFP_KERNEL); 771 part = kzalloc(sizeof(struct partition), GFP_KERNEL);
772 if (!part) 772 if (!part)
773 return; 773 return;
774 774
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index b01fc70a57db..a4d7529ef415 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -50,7 +50,7 @@ struct phy_device* phy_device_create(struct mii_bus *bus, int addr, int phy_id)
50 struct phy_device *dev; 50 struct phy_device *dev;
51 /* We allocate the device, and initialize the 51 /* We allocate the device, and initialize the
52 * default values */ 52 * default values */
53 dev = kcalloc(1, sizeof(*dev), GFP_KERNEL); 53 dev = kzalloc(sizeof(*dev), GFP_KERNEL);
54 54
55 if (NULL == dev) 55 if (NULL == dev)
56 return (struct phy_device*) PTR_ERR((void*)-ENOMEM); 56 return (struct phy_device*) PTR_ERR((void*)-ENOMEM);
diff --git a/drivers/net/skge.c b/drivers/net/skge.c
index b60f0451f6cd..8a39376f87dc 100644
--- a/drivers/net/skge.c
+++ b/drivers/net/skge.c
@@ -749,7 +749,7 @@ static int skge_ring_alloc(struct skge_ring *ring, void *vaddr, u32 base)
749 struct skge_element *e; 749 struct skge_element *e;
750 int i; 750 int i;
751 751
752 ring->start = kcalloc(sizeof(*e), ring->count, GFP_KERNEL); 752 ring->start = kcalloc(ring->count, sizeof(*e), GFP_KERNEL);
753 if (!ring->start) 753 if (!ring->start)
754 return -ENOMEM; 754 return -ENOMEM;
755 755
diff --git a/drivers/pcmcia/at91_cf.c b/drivers/pcmcia/at91_cf.c
index 52d4a38b3667..3334f22a86c0 100644
--- a/drivers/pcmcia/at91_cf.c
+++ b/drivers/pcmcia/at91_cf.c
@@ -230,7 +230,7 @@ static int __init at91_cf_probe(struct platform_device *pdev)
230 if (!io) 230 if (!io)
231 return -ENODEV; 231 return -ENODEV;
232 232
233 cf = kcalloc(1, sizeof *cf, GFP_KERNEL); 233 cf = kzalloc(sizeof *cf, GFP_KERNEL);
234 if (!cf) 234 if (!cf)
235 return -ENOMEM; 235 return -ENOMEM;
236 236
diff --git a/drivers/pcmcia/omap_cf.c b/drivers/pcmcia/omap_cf.c
index 06bf7f48836e..e65a6b8188f6 100644
--- a/drivers/pcmcia/omap_cf.c
+++ b/drivers/pcmcia/omap_cf.c
@@ -220,7 +220,7 @@ static int __devinit omap_cf_probe(struct device *dev)
220 if (irq < 0) 220 if (irq < 0)
221 return -EINVAL; 221 return -EINVAL;
222 222
223 cf = kcalloc(1, sizeof *cf, GFP_KERNEL); 223 cf = kzalloc(sizeof *cf, GFP_KERNEL);
224 if (!cf) 224 if (!cf)
225 return -ENOMEM; 225 return -ENOMEM;
226 init_timer(&cf->timer); 226 init_timer(&cf->timer);
diff --git a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c
index 3ac5b123215a..a0b158704ca1 100644
--- a/drivers/pnp/isapnp/core.c
+++ b/drivers/pnp/isapnp/core.c
@@ -395,7 +395,7 @@ static void isapnp_parse_id(struct pnp_dev * dev, unsigned short vendor, unsigne
395 struct pnp_id * id; 395 struct pnp_id * id;
396 if (!dev) 396 if (!dev)
397 return; 397 return;
398 id = kcalloc(1, sizeof(struct pnp_id), GFP_KERNEL); 398 id = kzalloc(sizeof(struct pnp_id), GFP_KERNEL);
399 if (!id) 399 if (!id)
400 return; 400 return;
401 sprintf(id->id, "%c%c%c%x%x%x%x", 401 sprintf(id->id, "%c%c%c%x%x%x%x",
@@ -419,7 +419,7 @@ static struct pnp_dev * __init isapnp_parse_device(struct pnp_card *card, int si
419 struct pnp_dev *dev; 419 struct pnp_dev *dev;
420 420
421 isapnp_peek(tmp, size); 421 isapnp_peek(tmp, size);
422 dev = kcalloc(1, sizeof(struct pnp_dev), GFP_KERNEL); 422 dev = kzalloc(sizeof(struct pnp_dev), GFP_KERNEL);
423 if (!dev) 423 if (!dev)
424 return NULL; 424 return NULL;
425 dev->number = number; 425 dev->number = number;
@@ -450,7 +450,7 @@ static void __init isapnp_parse_irq_resource(struct pnp_option *option,
450 unsigned long bits; 450 unsigned long bits;
451 451
452 isapnp_peek(tmp, size); 452 isapnp_peek(tmp, size);
453 irq = kcalloc(1, sizeof(struct pnp_irq), GFP_KERNEL); 453 irq = kzalloc(sizeof(struct pnp_irq), GFP_KERNEL);
454 if (!irq) 454 if (!irq)
455 return; 455 return;
456 bits = (tmp[1] << 8) | tmp[0]; 456 bits = (tmp[1] << 8) | tmp[0];
@@ -474,7 +474,7 @@ static void __init isapnp_parse_dma_resource(struct pnp_option *option,
474 struct pnp_dma *dma; 474 struct pnp_dma *dma;
475 475
476 isapnp_peek(tmp, size); 476 isapnp_peek(tmp, size);
477 dma = kcalloc(1, sizeof(struct pnp_dma), GFP_KERNEL); 477 dma = kzalloc(sizeof(struct pnp_dma), GFP_KERNEL);
478 if (!dma) 478 if (!dma)
479 return; 479 return;
480 dma->map = tmp[0]; 480 dma->map = tmp[0];
@@ -494,7 +494,7 @@ static void __init isapnp_parse_port_resource(struct pnp_option *option,
494 struct pnp_port *port; 494 struct pnp_port *port;
495 495
496 isapnp_peek(tmp, size); 496 isapnp_peek(tmp, size);
497 port = kcalloc(1, sizeof(struct pnp_port), GFP_KERNEL); 497 port = kzalloc(sizeof(struct pnp_port), GFP_KERNEL);
498 if (!port) 498 if (!port)
499 return; 499 return;
500 port->min = (tmp[2] << 8) | tmp[1]; 500 port->min = (tmp[2] << 8) | tmp[1];
@@ -517,7 +517,7 @@ static void __init isapnp_parse_fixed_port_resource(struct pnp_option *option,
517 struct pnp_port *port; 517 struct pnp_port *port;
518 518
519 isapnp_peek(tmp, size); 519 isapnp_peek(tmp, size);
520 port = kcalloc(1, sizeof(struct pnp_port), GFP_KERNEL); 520 port = kzalloc(sizeof(struct pnp_port), GFP_KERNEL);
521 if (!port) 521 if (!port)
522 return; 522 return;
523 port->min = port->max = (tmp[1] << 8) | tmp[0]; 523 port->min = port->max = (tmp[1] << 8) | tmp[0];
@@ -539,7 +539,7 @@ static void __init isapnp_parse_mem_resource(struct pnp_option *option,
539 struct pnp_mem *mem; 539 struct pnp_mem *mem;
540 540
541 isapnp_peek(tmp, size); 541 isapnp_peek(tmp, size);
542 mem = kcalloc(1, sizeof(struct pnp_mem), GFP_KERNEL); 542 mem = kzalloc(sizeof(struct pnp_mem), GFP_KERNEL);
543 if (!mem) 543 if (!mem)
544 return; 544 return;
545 mem->min = ((tmp[2] << 8) | tmp[1]) << 8; 545 mem->min = ((tmp[2] << 8) | tmp[1]) << 8;
@@ -562,7 +562,7 @@ static void __init isapnp_parse_mem32_resource(struct pnp_option *option,
562 struct pnp_mem *mem; 562 struct pnp_mem *mem;
563 563
564 isapnp_peek(tmp, size); 564 isapnp_peek(tmp, size);
565 mem = kcalloc(1, sizeof(struct pnp_mem), GFP_KERNEL); 565 mem = kzalloc(sizeof(struct pnp_mem), GFP_KERNEL);
566 if (!mem) 566 if (!mem)
567 return; 567 return;
568 mem->min = (tmp[4] << 24) | (tmp[3] << 16) | (tmp[2] << 8) | tmp[1]; 568 mem->min = (tmp[4] << 24) | (tmp[3] << 16) | (tmp[2] << 8) | tmp[1];
@@ -584,7 +584,7 @@ static void __init isapnp_parse_fixed_mem32_resource(struct pnp_option *option,
584 struct pnp_mem *mem; 584 struct pnp_mem *mem;
585 585
586 isapnp_peek(tmp, size); 586 isapnp_peek(tmp, size);
587 mem = kcalloc(1, sizeof(struct pnp_mem), GFP_KERNEL); 587 mem = kzalloc(sizeof(struct pnp_mem), GFP_KERNEL);
588 if (!mem) 588 if (!mem)
589 return; 589 return;
590 mem->min = mem->max = (tmp[4] << 24) | (tmp[3] << 16) | (tmp[2] << 8) | tmp[1]; 590 mem->min = mem->max = (tmp[4] << 24) | (tmp[3] << 16) | (tmp[2] << 8) | tmp[1];
@@ -829,7 +829,7 @@ static unsigned char __init isapnp_checksum(unsigned char *data)
829 829
830static void isapnp_parse_card_id(struct pnp_card * card, unsigned short vendor, unsigned short device) 830static void isapnp_parse_card_id(struct pnp_card * card, unsigned short vendor, unsigned short device)
831{ 831{
832 struct pnp_id * id = kcalloc(1, sizeof(struct pnp_id), GFP_KERNEL); 832 struct pnp_id * id = kzalloc(sizeof(struct pnp_id), GFP_KERNEL);
833 if (!id) 833 if (!id)
834 return; 834 return;
835 sprintf(id->id, "%c%c%c%x%x%x%x", 835 sprintf(id->id, "%c%c%c%x%x%x%x",
@@ -865,7 +865,7 @@ static int __init isapnp_build_device_list(void)
865 header[4], header[5], header[6], header[7], header[8]); 865 header[4], header[5], header[6], header[7], header[8]);
866 printk(KERN_DEBUG "checksum = 0x%x\n", checksum); 866 printk(KERN_DEBUG "checksum = 0x%x\n", checksum);
867#endif 867#endif
868 if ((card = kcalloc(1, sizeof(struct pnp_card), GFP_KERNEL)) == NULL) 868 if ((card = kzalloc(sizeof(struct pnp_card), GFP_KERNEL)) == NULL)
869 continue; 869 continue;
870 870
871 card->number = csn; 871 card->number = csn;
diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c
index 6cf34a63c790..62eda5d59024 100644
--- a/drivers/pnp/pnpacpi/core.c
+++ b/drivers/pnp/pnpacpi/core.c
@@ -139,7 +139,7 @@ static int __init pnpacpi_add_device(struct acpi_device *device)
139 return 0; 139 return 0;
140 140
141 pnp_dbg("ACPI device : hid %s", acpi_device_hid(device)); 141 pnp_dbg("ACPI device : hid %s", acpi_device_hid(device));
142 dev = kcalloc(1, sizeof(struct pnp_dev), GFP_KERNEL); 142 dev = kzalloc(sizeof(struct pnp_dev), GFP_KERNEL);
143 if (!dev) { 143 if (!dev) {
144 pnp_err("Out of memory"); 144 pnp_err("Out of memory");
145 return -ENOMEM; 145 return -ENOMEM;
@@ -169,7 +169,7 @@ static int __init pnpacpi_add_device(struct acpi_device *device)
169 dev->number = num; 169 dev->number = num;
170 170
171 /* set the initial values for the PnP device */ 171 /* set the initial values for the PnP device */
172 dev_id = kcalloc(1, sizeof(struct pnp_id), GFP_KERNEL); 172 dev_id = kzalloc(sizeof(struct pnp_id), GFP_KERNEL);
173 if (!dev_id) 173 if (!dev_id)
174 goto err; 174 goto err;
175 pnpidacpi_to_pnpid(acpi_device_hid(device), dev_id->id); 175 pnpidacpi_to_pnpid(acpi_device_hid(device), dev_id->id);
@@ -201,7 +201,7 @@ static int __init pnpacpi_add_device(struct acpi_device *device)
201 for (i = 0; i < cid_list->count; i++) { 201 for (i = 0; i < cid_list->count; i++) {
202 if (!ispnpidacpi(cid_list->id[i].value)) 202 if (!ispnpidacpi(cid_list->id[i].value))
203 continue; 203 continue;
204 dev_id = kcalloc(1, sizeof(struct pnp_id), GFP_KERNEL); 204 dev_id = kzalloc(sizeof(struct pnp_id), GFP_KERNEL);
205 if (!dev_id) 205 if (!dev_id)
206 continue; 206 continue;
207 207
diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c
index 379048fdf05d..7a535542fe92 100644
--- a/drivers/pnp/pnpacpi/rsparser.c
+++ b/drivers/pnp/pnpacpi/rsparser.c
@@ -298,7 +298,7 @@ static void pnpacpi_parse_dma_option(struct pnp_option *option, struct acpi_reso
298 298
299 if (p->channel_count == 0) 299 if (p->channel_count == 0)
300 return; 300 return;
301 dma = kcalloc(1, sizeof(struct pnp_dma), GFP_KERNEL); 301 dma = kzalloc(sizeof(struct pnp_dma), GFP_KERNEL);
302 if (!dma) 302 if (!dma)
303 return; 303 return;
304 304
@@ -354,7 +354,7 @@ static void pnpacpi_parse_irq_option(struct pnp_option *option,
354 354
355 if (p->interrupt_count == 0) 355 if (p->interrupt_count == 0)
356 return; 356 return;
357 irq = kcalloc(1, sizeof(struct pnp_irq), GFP_KERNEL); 357 irq = kzalloc(sizeof(struct pnp_irq), GFP_KERNEL);
358 if (!irq) 358 if (!irq)
359 return; 359 return;
360 360
@@ -375,7 +375,7 @@ static void pnpacpi_parse_ext_irq_option(struct pnp_option *option,
375 375
376 if (p->interrupt_count == 0) 376 if (p->interrupt_count == 0)
377 return; 377 return;
378 irq = kcalloc(1, sizeof(struct pnp_irq), GFP_KERNEL); 378 irq = kzalloc(sizeof(struct pnp_irq), GFP_KERNEL);
379 if (!irq) 379 if (!irq)
380 return; 380 return;
381 381
@@ -396,7 +396,7 @@ pnpacpi_parse_port_option(struct pnp_option *option,
396 396
397 if (io->address_length == 0) 397 if (io->address_length == 0)
398 return; 398 return;
399 port = kcalloc(1, sizeof(struct pnp_port), GFP_KERNEL); 399 port = kzalloc(sizeof(struct pnp_port), GFP_KERNEL);
400 if (!port) 400 if (!port)
401 return; 401 return;
402 port->min = io->minimum; 402 port->min = io->minimum;
@@ -417,7 +417,7 @@ pnpacpi_parse_fixed_port_option(struct pnp_option *option,
417 417
418 if (io->address_length == 0) 418 if (io->address_length == 0)
419 return; 419 return;
420 port = kcalloc(1, sizeof(struct pnp_port), GFP_KERNEL); 420 port = kzalloc(sizeof(struct pnp_port), GFP_KERNEL);
421 if (!port) 421 if (!port)
422 return; 422 return;
423 port->min = port->max = io->address; 423 port->min = port->max = io->address;
@@ -436,7 +436,7 @@ pnpacpi_parse_mem24_option(struct pnp_option *option,
436 436
437 if (p->address_length == 0) 437 if (p->address_length == 0)
438 return; 438 return;
439 mem = kcalloc(1, sizeof(struct pnp_mem), GFP_KERNEL); 439 mem = kzalloc(sizeof(struct pnp_mem), GFP_KERNEL);
440 if (!mem) 440 if (!mem)
441 return; 441 return;
442 mem->min = p->minimum; 442 mem->min = p->minimum;
@@ -459,7 +459,7 @@ pnpacpi_parse_mem32_option(struct pnp_option *option,
459 459
460 if (p->address_length == 0) 460 if (p->address_length == 0)
461 return; 461 return;
462 mem = kcalloc(1, sizeof(struct pnp_mem), GFP_KERNEL); 462 mem = kzalloc(sizeof(struct pnp_mem), GFP_KERNEL);
463 if (!mem) 463 if (!mem)
464 return; 464 return;
465 mem->min = p->minimum; 465 mem->min = p->minimum;
@@ -482,7 +482,7 @@ pnpacpi_parse_fixed_mem32_option(struct pnp_option *option,
482 482
483 if (p->address_length == 0) 483 if (p->address_length == 0)
484 return; 484 return;
485 mem = kcalloc(1, sizeof(struct pnp_mem), GFP_KERNEL); 485 mem = kzalloc(sizeof(struct pnp_mem), GFP_KERNEL);
486 if (!mem) 486 if (!mem)
487 return; 487 return;
488 mem->min = mem->max = p->address; 488 mem->min = mem->max = p->address;
@@ -514,7 +514,7 @@ pnpacpi_parse_address_option(struct pnp_option *option, struct acpi_resource *r)
514 return; 514 return;
515 515
516 if (p->resource_type == ACPI_MEMORY_RANGE) { 516 if (p->resource_type == ACPI_MEMORY_RANGE) {
517 mem = kcalloc(1, sizeof(struct pnp_mem), GFP_KERNEL); 517 mem = kzalloc(sizeof(struct pnp_mem), GFP_KERNEL);
518 if (!mem) 518 if (!mem)
519 return; 519 return;
520 mem->min = mem->max = p->minimum; 520 mem->min = mem->max = p->minimum;
@@ -524,7 +524,7 @@ pnpacpi_parse_address_option(struct pnp_option *option, struct acpi_resource *r)
524 ACPI_READ_WRITE_MEMORY) ? IORESOURCE_MEM_WRITEABLE : 0; 524 ACPI_READ_WRITE_MEMORY) ? IORESOURCE_MEM_WRITEABLE : 0;
525 pnp_register_mem_resource(option, mem); 525 pnp_register_mem_resource(option, mem);
526 } else if (p->resource_type == ACPI_IO_RANGE) { 526 } else if (p->resource_type == ACPI_IO_RANGE) {
527 port = kcalloc(1, sizeof(struct pnp_port), GFP_KERNEL); 527 port = kzalloc(sizeof(struct pnp_port), GFP_KERNEL);
528 if (!port) 528 if (!port)
529 return; 529 return;
530 port->min = port->max = p->minimum; 530 port->min = port->max = p->minimum;
@@ -721,7 +721,7 @@ int pnpacpi_build_resource_template(acpi_handle handle,
721 if (!res_cnt) 721 if (!res_cnt)
722 return -EINVAL; 722 return -EINVAL;
723 buffer->length = sizeof(struct acpi_resource) * (res_cnt + 1) + 1; 723 buffer->length = sizeof(struct acpi_resource) * (res_cnt + 1) + 1;
724 buffer->pointer = kcalloc(1, buffer->length - 1, GFP_KERNEL); 724 buffer->pointer = kzalloc(buffer->length - 1, GFP_KERNEL);
725 if (!buffer->pointer) 725 if (!buffer->pointer)
726 return -ENOMEM; 726 return -ENOMEM;
727 pnp_dbg("Res cnt %d", res_cnt); 727 pnp_dbg("Res cnt %d", res_cnt);
diff --git a/drivers/pnp/pnpbios/core.c b/drivers/pnp/pnpbios/core.c
index 33adeba1a31f..b7fdb4d21a96 100644
--- a/drivers/pnp/pnpbios/core.c
+++ b/drivers/pnp/pnpbios/core.c
@@ -112,7 +112,7 @@ static int pnp_dock_event(int dock, struct pnp_docking_station_info *info)
112 if (!(envp = (char **) kcalloc (20, sizeof (char *), GFP_KERNEL))) { 112 if (!(envp = (char **) kcalloc (20, sizeof (char *), GFP_KERNEL))) {
113 return -ENOMEM; 113 return -ENOMEM;
114 } 114 }
115 if (!(buf = kcalloc (1, 256, GFP_KERNEL))) { 115 if (!(buf = kzalloc(256, GFP_KERNEL))) {
116 kfree (envp); 116 kfree (envp);
117 return -ENOMEM; 117 return -ENOMEM;
118 } 118 }
@@ -220,7 +220,7 @@ static int pnpbios_get_resources(struct pnp_dev * dev, struct pnp_resource_table
220 if(!pnpbios_is_dynamic(dev)) 220 if(!pnpbios_is_dynamic(dev))
221 return -EPERM; 221 return -EPERM;
222 222
223 node = kcalloc(1, node_info.max_node_size, GFP_KERNEL); 223 node = kzalloc(node_info.max_node_size, GFP_KERNEL);
224 if (!node) 224 if (!node)
225 return -1; 225 return -1;
226 if (pnp_bios_get_dev_node(&nodenum, (char )PNPMODE_DYNAMIC, node)) { 226 if (pnp_bios_get_dev_node(&nodenum, (char )PNPMODE_DYNAMIC, node)) {
@@ -243,7 +243,7 @@ static int pnpbios_set_resources(struct pnp_dev * dev, struct pnp_resource_table
243 if (!pnpbios_is_dynamic(dev)) 243 if (!pnpbios_is_dynamic(dev))
244 return -EPERM; 244 return -EPERM;
245 245
246 node = kcalloc(1, node_info.max_node_size, GFP_KERNEL); 246 node = kzalloc(node_info.max_node_size, GFP_KERNEL);
247 if (!node) 247 if (!node)
248 return -1; 248 return -1;
249 if (pnp_bios_get_dev_node(&nodenum, (char )PNPMODE_DYNAMIC, node)) { 249 if (pnp_bios_get_dev_node(&nodenum, (char )PNPMODE_DYNAMIC, node)) {
@@ -294,7 +294,7 @@ static int pnpbios_disable_resources(struct pnp_dev *dev)
294 if(dev->flags & PNPBIOS_NO_DISABLE || !pnpbios_is_dynamic(dev)) 294 if(dev->flags & PNPBIOS_NO_DISABLE || !pnpbios_is_dynamic(dev))
295 return -EPERM; 295 return -EPERM;
296 296
297 node = kcalloc(1, node_info.max_node_size, GFP_KERNEL); 297 node = kzalloc(node_info.max_node_size, GFP_KERNEL);
298 if (!node) 298 if (!node)
299 return -ENOMEM; 299 return -ENOMEM;
300 300
@@ -336,7 +336,7 @@ static int insert_device(struct pnp_dev *dev, struct pnp_bios_node * node)
336 } 336 }
337 337
338 /* set the initial values for the PnP device */ 338 /* set the initial values for the PnP device */
339 dev_id = kcalloc(1, sizeof(struct pnp_id), GFP_KERNEL); 339 dev_id = kzalloc(sizeof(struct pnp_id), GFP_KERNEL);
340 if (!dev_id) 340 if (!dev_id)
341 return -1; 341 return -1;
342 pnpid32_to_pnpid(node->eisa_id,id); 342 pnpid32_to_pnpid(node->eisa_id,id);
@@ -374,7 +374,7 @@ static void __init build_devlist(void)
374 struct pnp_bios_node *node; 374 struct pnp_bios_node *node;
375 struct pnp_dev *dev; 375 struct pnp_dev *dev;
376 376
377 node = kcalloc(1, node_info.max_node_size, GFP_KERNEL); 377 node = kzalloc(node_info.max_node_size, GFP_KERNEL);
378 if (!node) 378 if (!node)
379 return; 379 return;
380 380
@@ -391,7 +391,7 @@ static void __init build_devlist(void)
391 break; 391 break;
392 } 392 }
393 nodes_got++; 393 nodes_got++;
394 dev = kcalloc(1, sizeof (struct pnp_dev), GFP_KERNEL); 394 dev = kzalloc(sizeof (struct pnp_dev), GFP_KERNEL);
395 if (!dev) 395 if (!dev)
396 break; 396 break;
397 if(insert_device(dev,node)<0) 397 if(insert_device(dev,node)<0)
diff --git a/drivers/pnp/pnpbios/proc.c b/drivers/pnp/pnpbios/proc.c
index 5a3dfc97f5e9..8027073f7919 100644
--- a/drivers/pnp/pnpbios/proc.c
+++ b/drivers/pnp/pnpbios/proc.c
@@ -87,7 +87,7 @@ static int proc_read_escd(char *buf, char **start, off_t pos,
87 return -EFBIG; 87 return -EFBIG;
88 } 88 }
89 89
90 tmpbuf = kcalloc(1, escd.escd_size, GFP_KERNEL); 90 tmpbuf = kzalloc(escd.escd_size, GFP_KERNEL);
91 if (!tmpbuf) return -ENOMEM; 91 if (!tmpbuf) return -ENOMEM;
92 92
93 if (pnp_bios_read_escd(tmpbuf, escd.nv_storage_base)) { 93 if (pnp_bios_read_escd(tmpbuf, escd.nv_storage_base)) {
@@ -133,7 +133,7 @@ static int proc_read_devices(char *buf, char **start, off_t pos,
133 if (pos >= 0xff) 133 if (pos >= 0xff)
134 return 0; 134 return 0;
135 135
136 node = kcalloc(1, node_info.max_node_size, GFP_KERNEL); 136 node = kzalloc(node_info.max_node_size, GFP_KERNEL);
137 if (!node) return -ENOMEM; 137 if (!node) return -ENOMEM;
138 138
139 for (nodenum=pos; nodenum<0xff; ) { 139 for (nodenum=pos; nodenum<0xff; ) {
@@ -168,7 +168,7 @@ static int proc_read_node(char *buf, char **start, off_t pos,
168 u8 nodenum = (long)data; 168 u8 nodenum = (long)data;
169 int len; 169 int len;
170 170
171 node = kcalloc(1, node_info.max_node_size, GFP_KERNEL); 171 node = kzalloc(node_info.max_node_size, GFP_KERNEL);
172 if (!node) return -ENOMEM; 172 if (!node) return -ENOMEM;
173 if (pnp_bios_get_dev_node(&nodenum, boot, node)) { 173 if (pnp_bios_get_dev_node(&nodenum, boot, node)) {
174 kfree(node); 174 kfree(node);
@@ -188,7 +188,7 @@ static int proc_write_node(struct file *file, const char __user *buf,
188 u8 nodenum = (long)data; 188 u8 nodenum = (long)data;
189 int ret = count; 189 int ret = count;
190 190
191 node = kcalloc(1, node_info.max_node_size, GFP_KERNEL); 191 node = kzalloc(node_info.max_node_size, GFP_KERNEL);
192 if (!node) 192 if (!node)
193 return -ENOMEM; 193 return -ENOMEM;
194 if (pnp_bios_get_dev_node(&nodenum, boot, node)) { 194 if (pnp_bios_get_dev_node(&nodenum, boot, node)) {
diff --git a/drivers/pnp/pnpbios/rsparser.c b/drivers/pnp/pnpbios/rsparser.c
index ef508a4de557..95b79685a9d1 100644
--- a/drivers/pnp/pnpbios/rsparser.c
+++ b/drivers/pnp/pnpbios/rsparser.c
@@ -248,7 +248,7 @@ static void
248pnpbios_parse_mem_option(unsigned char *p, int size, struct pnp_option *option) 248pnpbios_parse_mem_option(unsigned char *p, int size, struct pnp_option *option)
249{ 249{
250 struct pnp_mem * mem; 250 struct pnp_mem * mem;
251 mem = kcalloc(1, sizeof(struct pnp_mem), GFP_KERNEL); 251 mem = kzalloc(sizeof(struct pnp_mem), GFP_KERNEL);
252 if (!mem) 252 if (!mem)
253 return; 253 return;
254 mem->min = ((p[5] << 8) | p[4]) << 8; 254 mem->min = ((p[5] << 8) | p[4]) << 8;
@@ -264,7 +264,7 @@ static void
264pnpbios_parse_mem32_option(unsigned char *p, int size, struct pnp_option *option) 264pnpbios_parse_mem32_option(unsigned char *p, int size, struct pnp_option *option)
265{ 265{
266 struct pnp_mem * mem; 266 struct pnp_mem * mem;
267 mem = kcalloc(1, sizeof(struct pnp_mem), GFP_KERNEL); 267 mem = kzalloc(sizeof(struct pnp_mem), GFP_KERNEL);
268 if (!mem) 268 if (!mem)
269 return; 269 return;
270 mem->min = (p[7] << 24) | (p[6] << 16) | (p[5] << 8) | p[4]; 270 mem->min = (p[7] << 24) | (p[6] << 16) | (p[5] << 8) | p[4];
@@ -280,7 +280,7 @@ static void
280pnpbios_parse_fixed_mem32_option(unsigned char *p, int size, struct pnp_option *option) 280pnpbios_parse_fixed_mem32_option(unsigned char *p, int size, struct pnp_option *option)
281{ 281{
282 struct pnp_mem * mem; 282 struct pnp_mem * mem;
283 mem = kcalloc(1, sizeof(struct pnp_mem), GFP_KERNEL); 283 mem = kzalloc(sizeof(struct pnp_mem), GFP_KERNEL);
284 if (!mem) 284 if (!mem)
285 return; 285 return;
286 mem->min = mem->max = (p[7] << 24) | (p[6] << 16) | (p[5] << 8) | p[4]; 286 mem->min = mem->max = (p[7] << 24) | (p[6] << 16) | (p[5] << 8) | p[4];
@@ -297,7 +297,7 @@ pnpbios_parse_irq_option(unsigned char *p, int size, struct pnp_option *option)
297 struct pnp_irq * irq; 297 struct pnp_irq * irq;
298 unsigned long bits; 298 unsigned long bits;
299 299
300 irq = kcalloc(1, sizeof(struct pnp_irq), GFP_KERNEL); 300 irq = kzalloc(sizeof(struct pnp_irq), GFP_KERNEL);
301 if (!irq) 301 if (!irq)
302 return; 302 return;
303 bits = (p[2] << 8) | p[1]; 303 bits = (p[2] << 8) | p[1];
@@ -314,7 +314,7 @@ static void
314pnpbios_parse_dma_option(unsigned char *p, int size, struct pnp_option *option) 314pnpbios_parse_dma_option(unsigned char *p, int size, struct pnp_option *option)
315{ 315{
316 struct pnp_dma * dma; 316 struct pnp_dma * dma;
317 dma = kcalloc(1, sizeof(struct pnp_dma), GFP_KERNEL); 317 dma = kzalloc(sizeof(struct pnp_dma), GFP_KERNEL);
318 if (!dma) 318 if (!dma)
319 return; 319 return;
320 dma->map = p[1]; 320 dma->map = p[1];
@@ -327,7 +327,7 @@ static void
327pnpbios_parse_port_option(unsigned char *p, int size, struct pnp_option *option) 327pnpbios_parse_port_option(unsigned char *p, int size, struct pnp_option *option)
328{ 328{
329 struct pnp_port * port; 329 struct pnp_port * port;
330 port = kcalloc(1, sizeof(struct pnp_port), GFP_KERNEL); 330 port = kzalloc(sizeof(struct pnp_port), GFP_KERNEL);
331 if (!port) 331 if (!port)
332 return; 332 return;
333 port->min = (p[3] << 8) | p[2]; 333 port->min = (p[3] << 8) | p[2];
@@ -343,7 +343,7 @@ static void
343pnpbios_parse_fixed_port_option(unsigned char *p, int size, struct pnp_option *option) 343pnpbios_parse_fixed_port_option(unsigned char *p, int size, struct pnp_option *option)
344{ 344{
345 struct pnp_port * port; 345 struct pnp_port * port;
346 port = kcalloc(1, sizeof(struct pnp_port), GFP_KERNEL); 346 port = kzalloc(sizeof(struct pnp_port), GFP_KERNEL);
347 if (!port) 347 if (!port)
348 return; 348 return;
349 port->min = port->max = (p[2] << 8) | p[1]; 349 port->min = port->max = (p[2] << 8) | p[1];
@@ -527,7 +527,7 @@ pnpbios_parse_compatible_ids(unsigned char *p, unsigned char *end, struct pnp_de
527 case SMALL_TAG_COMPATDEVID: /* compatible ID */ 527 case SMALL_TAG_COMPATDEVID: /* compatible ID */
528 if (len != 4) 528 if (len != 4)
529 goto len_err; 529 goto len_err;
530 dev_id = kcalloc(1, sizeof (struct pnp_id), GFP_KERNEL); 530 dev_id = kzalloc(sizeof (struct pnp_id), GFP_KERNEL);
531 if (!dev_id) 531 if (!dev_id)
532 return NULL; 532 return NULL;
533 memset(dev_id, 0, sizeof(struct pnp_id)); 533 memset(dev_id, 0, sizeof(struct pnp_id));
diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.c b/drivers/scsi/sym53c8xx_2/sym_hipd.c
index 940fa1e6f994..21cd4c7f5289 100644
--- a/drivers/scsi/sym53c8xx_2/sym_hipd.c
+++ b/drivers/scsi/sym53c8xx_2/sym_hipd.c
@@ -5545,7 +5545,7 @@ int sym_hcb_attach(struct Scsi_Host *shost, struct sym_fw *fw, struct sym_nvram
5545 /* 5545 /*
5546 * Allocate the array of lists of CCBs hashed by DSA. 5546 * Allocate the array of lists of CCBs hashed by DSA.
5547 */ 5547 */
5548 np->ccbh = kcalloc(sizeof(struct sym_ccb **), CCB_HASH_SIZE, GFP_KERNEL); 5548 np->ccbh = kcalloc(CCB_HASH_SIZE, sizeof(struct sym_ccb **), GFP_KERNEL);
5549 if (!np->ccbh) 5549 if (!np->ccbh)
5550 goto attach_failed; 5550 goto attach_failed;
5551 5551
diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index 72f3db99ff94..3e0abbb49fe1 100644
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -598,7 +598,7 @@ at91_ep_alloc_request(struct usb_ep *_ep, unsigned int gfp_flags)
598{ 598{
599 struct at91_request *req; 599 struct at91_request *req;
600 600
601 req = kcalloc(1, sizeof (struct at91_request), gfp_flags); 601 req = kzalloc(sizeof (struct at91_request), gfp_flags);
602 if (!req) 602 if (!req)
603 return NULL; 603 return NULL;
604 604
diff --git a/drivers/usb/misc/uss720.c b/drivers/usb/misc/uss720.c
index 7e8a0acd52ee..70250252ae2a 100644
--- a/drivers/usb/misc/uss720.c
+++ b/drivers/usb/misc/uss720.c
@@ -705,7 +705,7 @@ static int uss720_probe(struct usb_interface *intf,
705 /* 705 /*
706 * Allocate parport interface 706 * Allocate parport interface
707 */ 707 */
708 if (!(priv = kcalloc(sizeof(struct parport_uss720_private), 1, GFP_KERNEL))) { 708 if (!(priv = kzalloc(sizeof(struct parport_uss720_private), GFP_KERNEL))) {
709 usb_put_dev(usbdev); 709 usb_put_dev(usbdev);
710 return -ENOMEM; 710 return -ENOMEM;
711 } 711 }
diff --git a/drivers/usb/net/rndis_host.c b/drivers/usb/net/rndis_host.c
index 99f26b3e502f..ea5f44de3de2 100644
--- a/drivers/usb/net/rndis_host.c
+++ b/drivers/usb/net/rndis_host.c
@@ -469,7 +469,7 @@ static void rndis_unbind(struct usbnet *dev, struct usb_interface *intf)
469 struct rndis_halt *halt; 469 struct rndis_halt *halt;
470 470
471 /* try to clear any rndis state/activity (no i/o from stack!) */ 471 /* try to clear any rndis state/activity (no i/o from stack!) */
472 halt = kcalloc(1, sizeof *halt, GFP_KERNEL); 472 halt = kzalloc(sizeof *halt, GFP_KERNEL);
473 if (halt) { 473 if (halt) {
474 halt->msg_type = RNDIS_MSG_HALT; 474 halt->msg_type = RNDIS_MSG_HALT;
475 halt->msg_len = ccpu2(sizeof *halt); 475 halt->msg_len = ccpu2(sizeof *halt);