diff options
author | Panagiotis Issaris <takis@issaris.org> | 2006-07-21 17:51:30 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-07-21 17:51:30 -0400 |
commit | 0da974f4f303a6842516b764507e3c0a03f41e5a (patch) | |
tree | 8872aec792f02040269c6769dd1009b20f71d186 /net/appletalk | |
parent | a0ee7c70b22f78593957f99faa06acb4747b8bc0 (diff) |
[NET]: Conversions from kmalloc+memset to k(z|c)alloc.
Signed-off-by: Panagiotis Issaris <takis@issaris.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/appletalk')
-rw-r--r-- | net/appletalk/ddp.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c index 5ee96d4b40e9..96dc6bb52d14 100644 --- a/net/appletalk/ddp.c +++ b/net/appletalk/ddp.c | |||
@@ -227,12 +227,11 @@ static void atif_drop_device(struct net_device *dev) | |||
227 | static struct atalk_iface *atif_add_device(struct net_device *dev, | 227 | static struct atalk_iface *atif_add_device(struct net_device *dev, |
228 | struct atalk_addr *sa) | 228 | struct atalk_addr *sa) |
229 | { | 229 | { |
230 | struct atalk_iface *iface = kmalloc(sizeof(*iface), GFP_KERNEL); | 230 | struct atalk_iface *iface = kzalloc(sizeof(*iface), GFP_KERNEL); |
231 | 231 | ||
232 | if (!iface) | 232 | if (!iface) |
233 | goto out; | 233 | goto out; |
234 | 234 | ||
235 | memset(iface, 0, sizeof(*iface)); | ||
236 | dev_hold(dev); | 235 | dev_hold(dev); |
237 | iface->dev = dev; | 236 | iface->dev = dev; |
238 | dev->atalk_ptr = iface; | 237 | dev->atalk_ptr = iface; |
@@ -559,12 +558,11 @@ static int atrtr_create(struct rtentry *r, struct net_device *devhint) | |||
559 | } | 558 | } |
560 | 559 | ||
561 | if (!rt) { | 560 | if (!rt) { |
562 | rt = kmalloc(sizeof(*rt), GFP_ATOMIC); | 561 | rt = kzalloc(sizeof(*rt), GFP_ATOMIC); |
563 | 562 | ||
564 | retval = -ENOBUFS; | 563 | retval = -ENOBUFS; |
565 | if (!rt) | 564 | if (!rt) |
566 | goto out_unlock; | 565 | goto out_unlock; |
567 | memset(rt, 0, sizeof(*rt)); | ||
568 | 566 | ||
569 | rt->next = atalk_routes; | 567 | rt->next = atalk_routes; |
570 | atalk_routes = rt; | 568 | atalk_routes = rt; |