aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMariusz Kozlowski <m.kozlowski@tuxland.pl>2007-08-10 18:26:18 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-08-14 01:52:13 -0400
commitf71417614d63932cf56ed98a0947568d6259d11e (patch)
tree296af8dc842a62aed78f8d4ad0709e7f5cb109b1
parent48e3eeb1a1a89a3ea256cf6d3c898e753787cfaa (diff)
[ATM] drivers/atm/iphase.c: mostly kmalloc + memset conversion to kzalloc
drivers/atm/iphase.c | 111508 -> 111431 (-77 bytes) drivers/atm/iphase.o | 254740 -> 254260 (-480 bytes) Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/atm/iphase.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c
index a3b605a0ca17..ef52452640e0 100644
--- a/drivers/atm/iphase.c
+++ b/drivers/atm/iphase.c
@@ -1601,14 +1601,14 @@ static int rx_init(struct atm_dev *dev)
1601 1601
1602 skb_queue_head_init(&iadev->rx_dma_q); 1602 skb_queue_head_init(&iadev->rx_dma_q);
1603 iadev->rx_free_desc_qhead = NULL; 1603 iadev->rx_free_desc_qhead = NULL;
1604 iadev->rx_open = kmalloc(4*iadev->num_vc,GFP_KERNEL); 1604
1605 if (!iadev->rx_open) 1605 iadev->rx_open = kzalloc(4 * iadev->num_vc, GFP_KERNEL);
1606 { 1606 if (!iadev->rx_open) {
1607 printk(KERN_ERR DEV_LABEL "itf %d couldn't get free page\n", 1607 printk(KERN_ERR DEV_LABEL "itf %d couldn't get free page\n",
1608 dev->number); 1608 dev->number);
1609 goto err_free_dle; 1609 goto err_free_dle;
1610 } 1610 }
1611 memset(iadev->rx_open, 0, 4*iadev->num_vc); 1611
1612 iadev->rxing = 1; 1612 iadev->rxing = 1;
1613 iadev->rx_pkt_cnt = 0; 1613 iadev->rx_pkt_cnt = 0;
1614 /* Mode Register */ 1614 /* Mode Register */
@@ -3171,12 +3171,12 @@ static int __devinit ia_init_one(struct pci_dev *pdev,
3171 unsigned long flags; 3171 unsigned long flags;
3172 int ret; 3172 int ret;
3173 3173
3174 iadev = kmalloc(sizeof(*iadev), GFP_KERNEL); 3174 iadev = kzalloc(sizeof(*iadev), GFP_KERNEL);
3175 if (!iadev) { 3175 if (!iadev) {
3176 ret = -ENOMEM; 3176 ret = -ENOMEM;
3177 goto err_out; 3177 goto err_out;
3178 } 3178 }
3179 memset(iadev, 0, sizeof(*iadev)); 3179
3180 iadev->pci = pdev; 3180 iadev->pci = pdev;
3181 3181
3182 IF_INIT(printk("ia detected at bus:%d dev: %d function:%d\n", 3182 IF_INIT(printk("ia detected at bus:%d dev: %d function:%d\n",