mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-11 00:08:50 +00:00
[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>
This commit is contained in:
parent
48e3eeb1a1
commit
f71417614d
@ -1601,14 +1601,14 @@ static int rx_init(struct atm_dev *dev)
|
|||||||
|
|
||||||
skb_queue_head_init(&iadev->rx_dma_q);
|
skb_queue_head_init(&iadev->rx_dma_q);
|
||||||
iadev->rx_free_desc_qhead = NULL;
|
iadev->rx_free_desc_qhead = NULL;
|
||||||
iadev->rx_open = kmalloc(4*iadev->num_vc,GFP_KERNEL);
|
|
||||||
if (!iadev->rx_open)
|
iadev->rx_open = kzalloc(4 * iadev->num_vc, GFP_KERNEL);
|
||||||
{
|
if (!iadev->rx_open) {
|
||||||
printk(KERN_ERR DEV_LABEL "itf %d couldn't get free page\n",
|
printk(KERN_ERR DEV_LABEL "itf %d couldn't get free page\n",
|
||||||
dev->number);
|
dev->number);
|
||||||
goto err_free_dle;
|
goto err_free_dle;
|
||||||
}
|
}
|
||||||
memset(iadev->rx_open, 0, 4*iadev->num_vc);
|
|
||||||
iadev->rxing = 1;
|
iadev->rxing = 1;
|
||||||
iadev->rx_pkt_cnt = 0;
|
iadev->rx_pkt_cnt = 0;
|
||||||
/* Mode Register */
|
/* Mode Register */
|
||||||
@ -3171,12 +3171,12 @@ static int __devinit ia_init_one(struct pci_dev *pdev,
|
|||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
iadev = kmalloc(sizeof(*iadev), GFP_KERNEL);
|
iadev = kzalloc(sizeof(*iadev), GFP_KERNEL);
|
||||||
if (!iadev) {
|
if (!iadev) {
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
goto err_out;
|
goto err_out;
|
||||||
}
|
}
|
||||||
memset(iadev, 0, sizeof(*iadev));
|
|
||||||
iadev->pci = pdev;
|
iadev->pci = pdev;
|
||||||
|
|
||||||
IF_INIT(printk("ia detected at bus:%d dev: %d function:%d\n",
|
IF_INIT(printk("ia detected at bus:%d dev: %d function:%d\n",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user