aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dv.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2006-04-07 17:52:59 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-04-10 01:25:48 -0400
commit77d04bd957ddca9d48a664e28b40f33993f4550e (patch)
tree8940d3ab7557aed03756e05eec13605e315c887e /net/core/dv.c
parent31380de95cc3183bbb379339e67f83d69e56fbd6 (diff)
[NET]: More kzalloc conversions.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dv.c')
-rw-r--r--net/core/dv.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/core/dv.c b/net/core/dv.c
index cf581407538c..29ee77f15932 100644
--- a/net/core/dv.c
+++ b/net/core/dv.c
@@ -55,15 +55,12 @@ int alloc_divert_blk(struct net_device *dev)
55 55
56 dev->divert = NULL; 56 dev->divert = NULL;
57 if (dev->type == ARPHRD_ETHER) { 57 if (dev->type == ARPHRD_ETHER) {
58 dev->divert = (struct divert_blk *) 58 dev->divert = kzalloc(alloc_size, GFP_KERNEL);
59 kmalloc(alloc_size, GFP_KERNEL);
60 if (dev->divert == NULL) { 59 if (dev->divert == NULL) {
61 printk(KERN_INFO "divert: unable to allocate divert_blk for %s\n", 60 printk(KERN_INFO "divert: unable to allocate divert_blk for %s\n",
62 dev->name); 61 dev->name);
63 return -ENOMEM; 62 return -ENOMEM;
64 } 63 }
65
66 memset(dev->divert, 0, sizeof(struct divert_blk));
67 dev_hold(dev); 64 dev_hold(dev);
68 } 65 }
69 66