From 0c1cca1d8e0d58775dad43374f925e6cddf1bebc Mon Sep 17 00:00:00 2001 From: Om Narasimhan Date: Tue, 3 Oct 2006 16:27:18 -0700 Subject: [ATM]: kmalloc to kzalloc patches for drivers/atm Signed-off-by: Om Narasimhan Signed-off-by: Chas Williams Signed-off-by: David S. Miller --- drivers/atm/zatm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'drivers/atm/zatm.c') diff --git a/drivers/atm/zatm.c b/drivers/atm/zatm.c index 2c65e82f0d6b..c491ec455cac 100644 --- a/drivers/atm/zatm.c +++ b/drivers/atm/zatm.c @@ -603,9 +603,8 @@ static int start_rx(struct atm_dev *dev) DPRINTK("start_rx\n"); zatm_dev = ZATM_DEV(dev); size = sizeof(struct atm_vcc *)*zatm_dev->chans; - zatm_dev->rx_map = (struct atm_vcc **) kmalloc(size,GFP_KERNEL); + zatm_dev->rx_map = kzalloc(size,GFP_KERNEL); if (!zatm_dev->rx_map) return -ENOMEM; - memset(zatm_dev->rx_map,0,size); /* set VPI/VCI split (use all VCIs and give what's left to VPIs) */ zpokel(zatm_dev,(1 << dev->ci_range.vci_bits)-1,uPD98401_VRR); /* prepare free buffer pools */ @@ -951,9 +950,8 @@ static int open_tx_first(struct atm_vcc *vcc) skb_queue_head_init(&zatm_vcc->tx_queue); init_waitqueue_head(&zatm_vcc->tx_wait); /* initialize ring */ - zatm_vcc->ring = kmalloc(RING_SIZE,GFP_KERNEL); + zatm_vcc->ring = kzalloc(RING_SIZE,GFP_KERNEL); if (!zatm_vcc->ring) return -ENOMEM; - memset(zatm_vcc->ring,0,RING_SIZE); loop = zatm_vcc->ring+RING_ENTRIES*RING_WORDS; loop[0] = uPD98401_TXPD_V; loop[1] = loop[2] = 0; -- cgit v1.2.2