aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net/iucv.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/net/iucv.c')
-rw-r--r--drivers/s390/net/iucv.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/s390/net/iucv.c b/drivers/s390/net/iucv.c
index 760e77ec5a11..6190be9dca99 100644
--- a/drivers/s390/net/iucv.c
+++ b/drivers/s390/net/iucv.c
@@ -386,7 +386,7 @@ iucv_init(void)
386 } 386 }
387 387
388 /* Note: GFP_DMA used used to get memory below 2G */ 388 /* Note: GFP_DMA used used to get memory below 2G */
389 iucv_external_int_buffer = kmalloc(sizeof(iucv_GeneralInterrupt), 389 iucv_external_int_buffer = kzalloc(sizeof(iucv_GeneralInterrupt),
390 GFP_KERNEL|GFP_DMA); 390 GFP_KERNEL|GFP_DMA);
391 if (!iucv_external_int_buffer) { 391 if (!iucv_external_int_buffer) {
392 printk(KERN_WARNING 392 printk(KERN_WARNING
@@ -396,10 +396,9 @@ iucv_init(void)
396 bus_unregister(&iucv_bus); 396 bus_unregister(&iucv_bus);
397 return -ENOMEM; 397 return -ENOMEM;
398 } 398 }
399 memset(iucv_external_int_buffer, 0, sizeof(iucv_GeneralInterrupt));
400 399
401 /* Initialize parameter pool */ 400 /* Initialize parameter pool */
402 iucv_param_pool = kmalloc(sizeof(iucv_param) * PARAM_POOL_SIZE, 401 iucv_param_pool = kzalloc(sizeof(iucv_param) * PARAM_POOL_SIZE,
403 GFP_KERNEL|GFP_DMA); 402 GFP_KERNEL|GFP_DMA);
404 if (!iucv_param_pool) { 403 if (!iucv_param_pool) {
405 printk(KERN_WARNING "%s: Could not allocate param pool\n", 404 printk(KERN_WARNING "%s: Could not allocate param pool\n",
@@ -410,7 +409,6 @@ iucv_init(void)
410 bus_unregister(&iucv_bus); 409 bus_unregister(&iucv_bus);
411 return -ENOMEM; 410 return -ENOMEM;
412 } 411 }
413 memset(iucv_param_pool, 0, sizeof(iucv_param) * PARAM_POOL_SIZE);
414 412
415 /* Initialize irq queue */ 413 /* Initialize irq queue */
416 INIT_LIST_HEAD(&iucv_irq_queue); 414 INIT_LIST_HEAD(&iucv_irq_queue);
@@ -793,15 +791,14 @@ iucv_register_program (__u8 pgmname[16],
793 } 791 }
794 792
795 max_connections = iucv_query_maxconn(); 793 max_connections = iucv_query_maxconn();
796 iucv_pathid_table = kmalloc(max_connections * sizeof(handler *), 794 iucv_pathid_table = kcalloc(max_connections, sizeof(handler *),
797 GFP_ATOMIC); 795 GFP_ATOMIC);
798 if (iucv_pathid_table == NULL) { 796 if (iucv_pathid_table == NULL) {
799 printk(KERN_WARNING "%s: iucv_pathid_table storage " 797 printk(KERN_WARNING "%s: iucv_pathid_table storage "
800 "allocation failed\n", __FUNCTION__); 798 "allocation failed\n", __FUNCTION__);
801 kfree(new_handler); 799 kfree(new_handler);
802 return NULL; 800 return NULL;
803 } 801 }
804 memset (iucv_pathid_table, 0, max_connections * sizeof(handler *));
805 } 802 }
806 memset(new_handler, 0, sizeof (handler)); 803 memset(new_handler, 0, sizeof (handler));
807 memcpy(new_handler->id.user_data, pgmname, 804 memcpy(new_handler->id.user_data, pgmname,