aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hysdn/hysdn_net.c
diff options
context:
space:
mode:
authorBurman Yan <yan_952@hotmail.com>2006-12-08 05:39:35 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-08 11:29:01 -0500
commit41f96935b4c41daea2c4dbbf137960375cf764c1 (patch)
tree9af3af5e41f68baf063b5f929797c837169bb9df /drivers/isdn/hysdn/hysdn_net.c
parent0b2dd130a5a8774a30de1f94266f6b9a9892153c (diff)
[PATCH] isdn: replace kmalloc+memset with kzalloc
Acked-by: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/isdn/hysdn/hysdn_net.c')
-rw-r--r--drivers/isdn/hysdn/hysdn_net.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/isdn/hysdn/hysdn_net.c b/drivers/isdn/hysdn/hysdn_net.c
index d205249a1242..557d96c78a62 100644
--- a/drivers/isdn/hysdn/hysdn_net.c
+++ b/drivers/isdn/hysdn/hysdn_net.c
@@ -278,11 +278,10 @@ hysdn_net_create(hysdn_card * card)
278 return (-ENOMEM); 278 return (-ENOMEM);
279 } 279 }
280 hysdn_net_release(card); /* release an existing net device */ 280 hysdn_net_release(card); /* release an existing net device */
281 if ((dev = kmalloc(sizeof(struct net_local), GFP_KERNEL)) == NULL) { 281 if ((dev = kzalloc(sizeof(struct net_local), GFP_KERNEL)) == NULL) {
282 printk(KERN_WARNING "HYSDN: unable to allocate mem\n"); 282 printk(KERN_WARNING "HYSDN: unable to allocate mem\n");
283 return (-ENOMEM); 283 return (-ENOMEM);
284 } 284 }
285 memset(dev, 0, sizeof(struct net_local)); /* clean the structure */
286 285
287 spin_lock_init(&((struct net_local *) dev)->lock); 286 spin_lock_init(&((struct net_local *) dev)->lock);
288 287