aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/esp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/esp.c')
-rw-r--r--drivers/char/esp.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/char/esp.c b/drivers/char/esp.c
index 74cd5118af57..2e7ae42a5503 100644
--- a/drivers/char/esp.c
+++ b/drivers/char/esp.c
@@ -2459,7 +2459,7 @@ static int __init espserial_init(void)
2459 return 1; 2459 return 1;
2460 } 2460 }
2461 2461
2462 info = kmalloc(sizeof(struct esp_struct), GFP_KERNEL); 2462 info = kzalloc(sizeof(struct esp_struct), GFP_KERNEL);
2463 2463
2464 if (!info) 2464 if (!info)
2465 { 2465 {
@@ -2469,7 +2469,6 @@ static int __init espserial_init(void)
2469 return 1; 2469 return 1;
2470 } 2470 }
2471 2471
2472 memset((void *)info, 0, sizeof(struct esp_struct));
2473 spin_lock_init(&info->lock); 2472 spin_lock_init(&info->lock);
2474 /* rx_trigger, tx_trigger are needed by autoconfig */ 2473 /* rx_trigger, tx_trigger are needed by autoconfig */
2475 info->config.rx_trigger = rx_trigger; 2474 info->config.rx_trigger = rx_trigger;
@@ -2527,7 +2526,7 @@ static int __init espserial_init(void)
2527 if (!dma) 2526 if (!dma)
2528 info->stat_flags |= ESP_STAT_NEVER_DMA; 2527 info->stat_flags |= ESP_STAT_NEVER_DMA;
2529 2528
2530 info = kmalloc(sizeof(struct esp_struct), GFP_KERNEL); 2529 info = kzalloc(sizeof(struct esp_struct), GFP_KERNEL);
2531 if (!info) 2530 if (!info)
2532 { 2531 {
2533 printk(KERN_ERR "Couldn't allocate memory for esp serial device information\n"); 2532 printk(KERN_ERR "Couldn't allocate memory for esp serial device information\n");
@@ -2536,7 +2535,6 @@ static int __init espserial_init(void)
2536 return 0; 2535 return 0;
2537 } 2536 }
2538 2537
2539 memset((void *)info, 0, sizeof(struct esp_struct));
2540 /* rx_trigger, tx_trigger are needed by autoconfig */ 2538 /* rx_trigger, tx_trigger are needed by autoconfig */
2541 info->config.rx_trigger = rx_trigger; 2539 info->config.rx_trigger = rx_trigger;
2542 info->config.tx_trigger = tx_trigger; 2540 info->config.tx_trigger = tx_trigger;