diff options
Diffstat (limited to 'drivers/atm/zatm.c')
-rw-r--r-- | drivers/atm/zatm.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/atm/zatm.c b/drivers/atm/zatm.c index 2c65e82f0d6b..083c5d3f2e18 100644 --- a/drivers/atm/zatm.c +++ b/drivers/atm/zatm.c | |||
@@ -603,9 +603,8 @@ static int start_rx(struct atm_dev *dev) | |||
603 | DPRINTK("start_rx\n"); | 603 | DPRINTK("start_rx\n"); |
604 | zatm_dev = ZATM_DEV(dev); | 604 | zatm_dev = ZATM_DEV(dev); |
605 | size = sizeof(struct atm_vcc *)*zatm_dev->chans; | 605 | size = sizeof(struct atm_vcc *)*zatm_dev->chans; |
606 | zatm_dev->rx_map = (struct atm_vcc **) kmalloc(size,GFP_KERNEL); | 606 | zatm_dev->rx_map = kzalloc(size,GFP_KERNEL); |
607 | if (!zatm_dev->rx_map) return -ENOMEM; | 607 | if (!zatm_dev->rx_map) return -ENOMEM; |
608 | memset(zatm_dev->rx_map,0,size); | ||
609 | /* set VPI/VCI split (use all VCIs and give what's left to VPIs) */ | 608 | /* set VPI/VCI split (use all VCIs and give what's left to VPIs) */ |
610 | zpokel(zatm_dev,(1 << dev->ci_range.vci_bits)-1,uPD98401_VRR); | 609 | zpokel(zatm_dev,(1 << dev->ci_range.vci_bits)-1,uPD98401_VRR); |
611 | /* prepare free buffer pools */ | 610 | /* prepare free buffer pools */ |
@@ -801,6 +800,7 @@ static int alloc_shaper(struct atm_dev *dev,int *pcr,int min,int max,int ubr) | |||
801 | i = m = 1; | 800 | i = m = 1; |
802 | zatm_dev->ubr_ref_cnt++; | 801 | zatm_dev->ubr_ref_cnt++; |
803 | zatm_dev->ubr = shaper; | 802 | zatm_dev->ubr = shaper; |
803 | *pcr = 0; | ||
804 | } | 804 | } |
805 | else { | 805 | else { |
806 | if (min) { | 806 | if (min) { |
@@ -951,9 +951,8 @@ static int open_tx_first(struct atm_vcc *vcc) | |||
951 | skb_queue_head_init(&zatm_vcc->tx_queue); | 951 | skb_queue_head_init(&zatm_vcc->tx_queue); |
952 | init_waitqueue_head(&zatm_vcc->tx_wait); | 952 | init_waitqueue_head(&zatm_vcc->tx_wait); |
953 | /* initialize ring */ | 953 | /* initialize ring */ |
954 | zatm_vcc->ring = kmalloc(RING_SIZE,GFP_KERNEL); | 954 | zatm_vcc->ring = kzalloc(RING_SIZE,GFP_KERNEL); |
955 | if (!zatm_vcc->ring) return -ENOMEM; | 955 | if (!zatm_vcc->ring) return -ENOMEM; |
956 | memset(zatm_vcc->ring,0,RING_SIZE); | ||
957 | loop = zatm_vcc->ring+RING_ENTRIES*RING_WORDS; | 956 | loop = zatm_vcc->ring+RING_ENTRIES*RING_WORDS; |
958 | loop[0] = uPD98401_TXPD_V; | 957 | loop[0] = uPD98401_TXPD_V; |
959 | loop[1] = loop[2] = 0; | 958 | loop[1] = loop[2] = 0; |