aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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
-rw-r--r--fs/ocfs2/alloc.c2
-rw-r--r--fs/ocfs2/cluster/heartbeat.c4
-rw-r--r--fs/ocfs2/cluster/nodemanager.c6
-rw-r--r--fs/ocfs2/cluster/tcp.c10
-rw-r--r--fs/ocfs2/dlm/dlmdomain.c4
-rw-r--r--fs/ocfs2/dlm/dlmlock.c4
-rw-r--r--fs/ocfs2/dlm/dlmmaster.c2
-rw-r--r--fs/ocfs2/dlm/dlmrecovery.c6
-rw-r--r--fs/ocfs2/localalloc.c2
-rw-r--r--fs/ocfs2/slot_map.c2
-rw-r--r--fs/ocfs2/suballoc.c6
-rw-r--r--fs/ocfs2/super.c6
-rw-r--r--fs/ocfs2/vote.c4
-rw-r--r--include/linux/gameport.h2
-rw-r--r--kernel/relay.c4
-rw-r--r--net/sunrpc/svc.c2
33 files changed, 89 insertions, 89 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);
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c
index edc91ca3792a..f27e5378caf2 100644
--- a/fs/ocfs2/alloc.c
+++ b/fs/ocfs2/alloc.c
@@ -1959,7 +1959,7 @@ int ocfs2_prepare_truncate(struct ocfs2_super *osb,
1959 goto bail; 1959 goto bail;
1960 } 1960 }
1961 1961
1962 *tc = kcalloc(1, sizeof(struct ocfs2_truncate_context), GFP_KERNEL); 1962 *tc = kzalloc(sizeof(struct ocfs2_truncate_context), GFP_KERNEL);
1963 if (!(*tc)) { 1963 if (!(*tc)) {
1964 status = -ENOMEM; 1964 status = -ENOMEM;
1965 mlog_errno(status); 1965 mlog_errno(status);
diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c
index 4cd9a9580456..a25ef5a50386 100644
--- a/fs/ocfs2/cluster/heartbeat.c
+++ b/fs/ocfs2/cluster/heartbeat.c
@@ -1553,7 +1553,7 @@ static struct config_item *o2hb_heartbeat_group_make_item(struct config_group *g
1553 struct o2hb_region *reg = NULL; 1553 struct o2hb_region *reg = NULL;
1554 struct config_item *ret = NULL; 1554 struct config_item *ret = NULL;
1555 1555
1556 reg = kcalloc(1, sizeof(struct o2hb_region), GFP_KERNEL); 1556 reg = kzalloc(sizeof(struct o2hb_region), GFP_KERNEL);
1557 if (reg == NULL) 1557 if (reg == NULL)
1558 goto out; /* ENOMEM */ 1558 goto out; /* ENOMEM */
1559 1559
@@ -1679,7 +1679,7 @@ struct config_group *o2hb_alloc_hb_set(void)
1679 struct o2hb_heartbeat_group *hs = NULL; 1679 struct o2hb_heartbeat_group *hs = NULL;
1680 struct config_group *ret = NULL; 1680 struct config_group *ret = NULL;
1681 1681
1682 hs = kcalloc(1, sizeof(struct o2hb_heartbeat_group), GFP_KERNEL); 1682 hs = kzalloc(sizeof(struct o2hb_heartbeat_group), GFP_KERNEL);
1683 if (hs == NULL) 1683 if (hs == NULL)
1684 goto out; 1684 goto out;
1685 1685
diff --git a/fs/ocfs2/cluster/nodemanager.c b/fs/ocfs2/cluster/nodemanager.c
index 357f1d551771..b17333a0606b 100644
--- a/fs/ocfs2/cluster/nodemanager.c
+++ b/fs/ocfs2/cluster/nodemanager.c
@@ -714,7 +714,7 @@ static struct config_item *o2nm_node_group_make_item(struct config_group *group,
714 if (strlen(name) > O2NM_MAX_NAME_LEN) 714 if (strlen(name) > O2NM_MAX_NAME_LEN)
715 goto out; /* ENAMETOOLONG */ 715 goto out; /* ENAMETOOLONG */
716 716
717 node = kcalloc(1, sizeof(struct o2nm_node), GFP_KERNEL); 717 node = kzalloc(sizeof(struct o2nm_node), GFP_KERNEL);
718 if (node == NULL) 718 if (node == NULL)
719 goto out; /* ENOMEM */ 719 goto out; /* ENOMEM */
720 720
@@ -825,8 +825,8 @@ static struct config_group *o2nm_cluster_group_make_group(struct config_group *g
825 if (o2nm_single_cluster) 825 if (o2nm_single_cluster)
826 goto out; /* ENOSPC */ 826 goto out; /* ENOSPC */
827 827
828 cluster = kcalloc(1, sizeof(struct o2nm_cluster), GFP_KERNEL); 828 cluster = kzalloc(sizeof(struct o2nm_cluster), GFP_KERNEL);
829 ns = kcalloc(1, sizeof(struct o2nm_node_group), GFP_KERNEL); 829 ns = kzalloc(sizeof(struct o2nm_node_group), GFP_KERNEL);
830 defs = kcalloc(3, sizeof(struct config_group *), GFP_KERNEL); 830 defs = kcalloc(3, sizeof(struct config_group *), GFP_KERNEL);
831 o2hb_group = o2hb_alloc_hb_set(); 831 o2hb_group = o2hb_alloc_hb_set();
832 if (cluster == NULL || ns == NULL || o2hb_group == NULL || defs == NULL) 832 if (cluster == NULL || ns == NULL || o2hb_group == NULL || defs == NULL)
diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c
index 457753df1ae7..ae4ff4a6636b 100644
--- a/fs/ocfs2/cluster/tcp.c
+++ b/fs/ocfs2/cluster/tcp.c
@@ -324,7 +324,7 @@ static struct o2net_sock_container *sc_alloc(struct o2nm_node *node)
324 struct page *page = NULL; 324 struct page *page = NULL;
325 325
326 page = alloc_page(GFP_NOFS); 326 page = alloc_page(GFP_NOFS);
327 sc = kcalloc(1, sizeof(*sc), GFP_NOFS); 327 sc = kzalloc(sizeof(*sc), GFP_NOFS);
328 if (sc == NULL || page == NULL) 328 if (sc == NULL || page == NULL)
329 goto out; 329 goto out;
330 330
@@ -714,7 +714,7 @@ int o2net_register_handler(u32 msg_type, u32 key, u32 max_len,
714 goto out; 714 goto out;
715 } 715 }
716 716
717 nmh = kcalloc(1, sizeof(struct o2net_msg_handler), GFP_NOFS); 717 nmh = kzalloc(sizeof(struct o2net_msg_handler), GFP_NOFS);
718 if (nmh == NULL) { 718 if (nmh == NULL) {
719 ret = -ENOMEM; 719 ret = -ENOMEM;
720 goto out; 720 goto out;
@@ -1918,9 +1918,9 @@ int o2net_init(void)
1918 1918
1919 o2quo_init(); 1919 o2quo_init();
1920 1920
1921 o2net_hand = kcalloc(1, sizeof(struct o2net_handshake), GFP_KERNEL); 1921 o2net_hand = kzalloc(sizeof(struct o2net_handshake), GFP_KERNEL);
1922 o2net_keep_req = kcalloc(1, sizeof(struct o2net_msg), GFP_KERNEL); 1922 o2net_keep_req = kzalloc(sizeof(struct o2net_msg), GFP_KERNEL);
1923 o2net_keep_resp = kcalloc(1, sizeof(struct o2net_msg), GFP_KERNEL); 1923 o2net_keep_resp = kzalloc(sizeof(struct o2net_msg), GFP_KERNEL);
1924 if (!o2net_hand || !o2net_keep_req || !o2net_keep_resp) { 1924 if (!o2net_hand || !o2net_keep_req || !o2net_keep_resp) {
1925 kfree(o2net_hand); 1925 kfree(o2net_hand);
1926 kfree(o2net_keep_req); 1926 kfree(o2net_keep_req);
diff --git a/fs/ocfs2/dlm/dlmdomain.c b/fs/ocfs2/dlm/dlmdomain.c
index 420a375a3949..f0b25f2dd205 100644
--- a/fs/ocfs2/dlm/dlmdomain.c
+++ b/fs/ocfs2/dlm/dlmdomain.c
@@ -920,7 +920,7 @@ static int dlm_try_to_join_domain(struct dlm_ctxt *dlm)
920 920
921 mlog_entry("%p", dlm); 921 mlog_entry("%p", dlm);
922 922
923 ctxt = kcalloc(1, sizeof(*ctxt), GFP_KERNEL); 923 ctxt = kzalloc(sizeof(*ctxt), GFP_KERNEL);
924 if (!ctxt) { 924 if (!ctxt) {
925 status = -ENOMEM; 925 status = -ENOMEM;
926 mlog_errno(status); 926 mlog_errno(status);
@@ -1223,7 +1223,7 @@ static struct dlm_ctxt *dlm_alloc_ctxt(const char *domain,
1223 int i; 1223 int i;
1224 struct dlm_ctxt *dlm = NULL; 1224 struct dlm_ctxt *dlm = NULL;
1225 1225
1226 dlm = kcalloc(1, sizeof(*dlm), GFP_KERNEL); 1226 dlm = kzalloc(sizeof(*dlm), GFP_KERNEL);
1227 if (!dlm) { 1227 if (!dlm) {
1228 mlog_errno(-ENOMEM); 1228 mlog_errno(-ENOMEM);
1229 goto leave; 1229 goto leave;
diff --git a/fs/ocfs2/dlm/dlmlock.c b/fs/ocfs2/dlm/dlmlock.c
index 42a1b91979b5..e5ca3db197f6 100644
--- a/fs/ocfs2/dlm/dlmlock.c
+++ b/fs/ocfs2/dlm/dlmlock.c
@@ -408,13 +408,13 @@ struct dlm_lock * dlm_new_lock(int type, u8 node, u64 cookie,
408 struct dlm_lock *lock; 408 struct dlm_lock *lock;
409 int kernel_allocated = 0; 409 int kernel_allocated = 0;
410 410
411 lock = kcalloc(1, sizeof(*lock), GFP_NOFS); 411 lock = kzalloc(sizeof(*lock), GFP_NOFS);
412 if (!lock) 412 if (!lock)
413 return NULL; 413 return NULL;
414 414
415 if (!lksb) { 415 if (!lksb) {
416 /* zero memory only if kernel-allocated */ 416 /* zero memory only if kernel-allocated */
417 lksb = kcalloc(1, sizeof(*lksb), GFP_NOFS); 417 lksb = kzalloc(sizeof(*lksb), GFP_NOFS);
418 if (!lksb) { 418 if (!lksb) {
419 kfree(lock); 419 kfree(lock);
420 return NULL; 420 return NULL;
diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c
index 856012b4fa49..0ad872055cb3 100644
--- a/fs/ocfs2/dlm/dlmmaster.c
+++ b/fs/ocfs2/dlm/dlmmaster.c
@@ -1939,7 +1939,7 @@ int dlm_dispatch_assert_master(struct dlm_ctxt *dlm,
1939 int ignore_higher, u8 request_from, u32 flags) 1939 int ignore_higher, u8 request_from, u32 flags)
1940{ 1940{
1941 struct dlm_work_item *item; 1941 struct dlm_work_item *item;
1942 item = kcalloc(1, sizeof(*item), GFP_NOFS); 1942 item = kzalloc(sizeof(*item), GFP_NOFS);
1943 if (!item) 1943 if (!item)
1944 return -ENOMEM; 1944 return -ENOMEM;
1945 1945
diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c
index fb3e2b0817f1..367a11e9e2ed 100644
--- a/fs/ocfs2/dlm/dlmrecovery.c
+++ b/fs/ocfs2/dlm/dlmrecovery.c
@@ -757,7 +757,7 @@ static int dlm_init_recovery_area(struct dlm_ctxt *dlm, u8 dead_node)
757 } 757 }
758 BUG_ON(num == dead_node); 758 BUG_ON(num == dead_node);
759 759
760 ndata = kcalloc(1, sizeof(*ndata), GFP_NOFS); 760 ndata = kzalloc(sizeof(*ndata), GFP_NOFS);
761 if (!ndata) { 761 if (!ndata) {
762 dlm_destroy_recovery_area(dlm, dead_node); 762 dlm_destroy_recovery_area(dlm, dead_node);
763 return -ENOMEM; 763 return -ENOMEM;
@@ -842,7 +842,7 @@ int dlm_request_all_locks_handler(struct o2net_msg *msg, u32 len, void *data)
842 } 842 }
843 BUG_ON(lr->dead_node != dlm->reco.dead_node); 843 BUG_ON(lr->dead_node != dlm->reco.dead_node);
844 844
845 item = kcalloc(1, sizeof(*item), GFP_NOFS); 845 item = kzalloc(sizeof(*item), GFP_NOFS);
846 if (!item) { 846 if (!item) {
847 dlm_put(dlm); 847 dlm_put(dlm);
848 return -ENOMEM; 848 return -ENOMEM;
@@ -1323,7 +1323,7 @@ int dlm_mig_lockres_handler(struct o2net_msg *msg, u32 len, void *data)
1323 1323
1324 ret = -ENOMEM; 1324 ret = -ENOMEM;
1325 buf = kmalloc(be16_to_cpu(msg->data_len), GFP_NOFS); 1325 buf = kmalloc(be16_to_cpu(msg->data_len), GFP_NOFS);
1326 item = kcalloc(1, sizeof(*item), GFP_NOFS); 1326 item = kzalloc(sizeof(*item), GFP_NOFS);
1327 if (!buf || !item) 1327 if (!buf || !item)
1328 goto leave; 1328 goto leave;
1329 1329
diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c
index 698d79a74ef8..4dedd9789108 100644
--- a/fs/ocfs2/localalloc.c
+++ b/fs/ocfs2/localalloc.c
@@ -776,7 +776,7 @@ static int ocfs2_local_alloc_reserve_for_window(struct ocfs2_super *osb,
776{ 776{
777 int status; 777 int status;
778 778
779 *ac = kcalloc(1, sizeof(struct ocfs2_alloc_context), GFP_KERNEL); 779 *ac = kzalloc(sizeof(struct ocfs2_alloc_context), GFP_KERNEL);
780 if (!(*ac)) { 780 if (!(*ac)) {
781 status = -ENOMEM; 781 status = -ENOMEM;
782 mlog_errno(status); 782 mlog_errno(status);
diff --git a/fs/ocfs2/slot_map.c b/fs/ocfs2/slot_map.c
index aa6f5aadedc4..2d3ac32cb74e 100644
--- a/fs/ocfs2/slot_map.c
+++ b/fs/ocfs2/slot_map.c
@@ -175,7 +175,7 @@ int ocfs2_init_slot_info(struct ocfs2_super *osb)
175 struct buffer_head *bh = NULL; 175 struct buffer_head *bh = NULL;
176 struct ocfs2_slot_info *si; 176 struct ocfs2_slot_info *si;
177 177
178 si = kcalloc(1, sizeof(struct ocfs2_slot_info), GFP_KERNEL); 178 si = kzalloc(sizeof(struct ocfs2_slot_info), GFP_KERNEL);
179 if (!si) { 179 if (!si) {
180 status = -ENOMEM; 180 status = -ENOMEM;
181 mlog_errno(status); 181 mlog_errno(status);
diff --git a/fs/ocfs2/suballoc.c b/fs/ocfs2/suballoc.c
index 000d71cca6c5..6dbb11762759 100644
--- a/fs/ocfs2/suballoc.c
+++ b/fs/ocfs2/suballoc.c
@@ -488,7 +488,7 @@ int ocfs2_reserve_new_metadata(struct ocfs2_super *osb,
488 int status; 488 int status;
489 u32 slot; 489 u32 slot;
490 490
491 *ac = kcalloc(1, sizeof(struct ocfs2_alloc_context), GFP_KERNEL); 491 *ac = kzalloc(sizeof(struct ocfs2_alloc_context), GFP_KERNEL);
492 if (!(*ac)) { 492 if (!(*ac)) {
493 status = -ENOMEM; 493 status = -ENOMEM;
494 mlog_errno(status); 494 mlog_errno(status);
@@ -530,7 +530,7 @@ int ocfs2_reserve_new_inode(struct ocfs2_super *osb,
530{ 530{
531 int status; 531 int status;
532 532
533 *ac = kcalloc(1, sizeof(struct ocfs2_alloc_context), GFP_KERNEL); 533 *ac = kzalloc(sizeof(struct ocfs2_alloc_context), GFP_KERNEL);
534 if (!(*ac)) { 534 if (!(*ac)) {
535 status = -ENOMEM; 535 status = -ENOMEM;
536 mlog_errno(status); 536 mlog_errno(status);
@@ -595,7 +595,7 @@ int ocfs2_reserve_clusters(struct ocfs2_super *osb,
595 595
596 mlog_entry_void(); 596 mlog_entry_void();
597 597
598 *ac = kcalloc(1, sizeof(struct ocfs2_alloc_context), GFP_KERNEL); 598 *ac = kzalloc(sizeof(struct ocfs2_alloc_context), GFP_KERNEL);
599 if (!(*ac)) { 599 if (!(*ac)) {
600 status = -ENOMEM; 600 status = -ENOMEM;
601 mlog_errno(status); 601 mlog_errno(status);
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index a6d2f8cc165b..6e300a88a47e 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -1231,7 +1231,7 @@ static int ocfs2_setup_osb_uuid(struct ocfs2_super *osb, const unsigned char *uu
1231 1231
1232 BUG_ON(uuid_bytes != OCFS2_VOL_UUID_LEN); 1232 BUG_ON(uuid_bytes != OCFS2_VOL_UUID_LEN);
1233 1233
1234 osb->uuid_str = kcalloc(1, OCFS2_VOL_UUID_LEN * 2 + 1, GFP_KERNEL); 1234 osb->uuid_str = kzalloc(OCFS2_VOL_UUID_LEN * 2 + 1, GFP_KERNEL);
1235 if (osb->uuid_str == NULL) 1235 if (osb->uuid_str == NULL)
1236 return -ENOMEM; 1236 return -ENOMEM;
1237 1237
@@ -1262,7 +1262,7 @@ static int ocfs2_initialize_super(struct super_block *sb,
1262 1262
1263 mlog_entry_void(); 1263 mlog_entry_void();
1264 1264
1265 osb = kcalloc(1, sizeof(struct ocfs2_super), GFP_KERNEL); 1265 osb = kzalloc(sizeof(struct ocfs2_super), GFP_KERNEL);
1266 if (!osb) { 1266 if (!osb) {
1267 status = -ENOMEM; 1267 status = -ENOMEM;
1268 mlog_errno(status); 1268 mlog_errno(status);
@@ -1387,7 +1387,7 @@ static int ocfs2_initialize_super(struct super_block *sb,
1387 */ 1387 */
1388 /* initialize our journal structure */ 1388 /* initialize our journal structure */
1389 1389
1390 journal = kcalloc(1, sizeof(struct ocfs2_journal), GFP_KERNEL); 1390 journal = kzalloc(sizeof(struct ocfs2_journal), GFP_KERNEL);
1391 if (!journal) { 1391 if (!journal) {
1392 mlog(ML_ERROR, "unable to alloc journal\n"); 1392 mlog(ML_ERROR, "unable to alloc journal\n");
1393 status = -ENOMEM; 1393 status = -ENOMEM;
diff --git a/fs/ocfs2/vote.c b/fs/ocfs2/vote.c
index 0315a8b61ed6..0afd8b9af70f 100644
--- a/fs/ocfs2/vote.c
+++ b/fs/ocfs2/vote.c
@@ -479,7 +479,7 @@ static struct ocfs2_net_wait_ctxt *ocfs2_new_net_wait_ctxt(unsigned int response
479{ 479{
480 struct ocfs2_net_wait_ctxt *w; 480 struct ocfs2_net_wait_ctxt *w;
481 481
482 w = kcalloc(1, sizeof(*w), GFP_NOFS); 482 w = kzalloc(sizeof(*w), GFP_NOFS);
483 if (!w) { 483 if (!w) {
484 mlog_errno(-ENOMEM); 484 mlog_errno(-ENOMEM);
485 goto bail; 485 goto bail;
@@ -642,7 +642,7 @@ static struct ocfs2_vote_msg * ocfs2_new_vote_request(struct ocfs2_super *osb,
642 642
643 BUG_ON(!ocfs2_is_valid_vote_request(type)); 643 BUG_ON(!ocfs2_is_valid_vote_request(type));
644 644
645 request = kcalloc(1, sizeof(*request), GFP_NOFS); 645 request = kzalloc(sizeof(*request), GFP_NOFS);
646 if (!request) { 646 if (!request) {
647 mlog_errno(-ENOMEM); 647 mlog_errno(-ENOMEM);
648 } else { 648 } else {
diff --git a/include/linux/gameport.h b/include/linux/gameport.h
index 2cdba0c23957..afad95272841 100644
--- a/include/linux/gameport.h
+++ b/include/linux/gameport.h
@@ -105,7 +105,7 @@ static inline void gameport_set_phys(struct gameport *gameport,
105 105
106static inline struct gameport *gameport_allocate_port(void) 106static inline struct gameport *gameport_allocate_port(void)
107{ 107{
108 struct gameport *gameport = kcalloc(1, sizeof(struct gameport), GFP_KERNEL); 108 struct gameport *gameport = kzalloc(sizeof(struct gameport), GFP_KERNEL);
109 109
110 return gameport; 110 return gameport;
111} 111}
diff --git a/kernel/relay.c b/kernel/relay.c
index 818e514729cf..a4701e7ba7d0 100644
--- a/kernel/relay.c
+++ b/kernel/relay.c
@@ -138,7 +138,7 @@ depopulate:
138 */ 138 */
139struct rchan_buf *relay_create_buf(struct rchan *chan) 139struct rchan_buf *relay_create_buf(struct rchan *chan)
140{ 140{
141 struct rchan_buf *buf = kcalloc(1, sizeof(struct rchan_buf), GFP_KERNEL); 141 struct rchan_buf *buf = kzalloc(sizeof(struct rchan_buf), GFP_KERNEL);
142 if (!buf) 142 if (!buf)
143 return NULL; 143 return NULL;
144 144
@@ -479,7 +479,7 @@ struct rchan *relay_open(const char *base_filename,
479 if (!(subbuf_size && n_subbufs)) 479 if (!(subbuf_size && n_subbufs))
480 return NULL; 480 return NULL;
481 481
482 chan = kcalloc(1, sizeof(struct rchan), GFP_KERNEL); 482 chan = kzalloc(sizeof(struct rchan), GFP_KERNEL);
483 if (!chan) 483 if (!chan)
484 return NULL; 484 return NULL;
485 485
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index eb44ec929ca1..f3001f3626f6 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -308,7 +308,7 @@ __svc_create(struct svc_program *prog, unsigned int bufsize, int npools,
308 308
309 serv->sv_nrpools = npools; 309 serv->sv_nrpools = npools;
310 serv->sv_pools = 310 serv->sv_pools =
311 kcalloc(sizeof(struct svc_pool), serv->sv_nrpools, 311 kcalloc(serv->sv_nrpools, sizeof(struct svc_pool),
312 GFP_KERNEL); 312 GFP_KERNEL);
313 if (!serv->sv_pools) { 313 if (!serv->sv_pools) {
314 kfree(serv); 314 kfree(serv);