diff options
Diffstat (limited to 'net/appletalk/ddp.c')
-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; |