diff options
author | Burman Yan <yan_952@hotmail.com> | 2006-12-08 05:39:35 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-08 11:29:01 -0500 |
commit | 41f96935b4c41daea2c4dbbf137960375cf764c1 (patch) | |
tree | 9af3af5e41f68baf063b5f929797c837169bb9df /drivers/isdn/icn/icn.c | |
parent | 0b2dd130a5a8774a30de1f94266f6b9a9892153c (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/icn/icn.c')
-rw-r--r-- | drivers/isdn/icn/icn.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/isdn/icn/icn.c b/drivers/isdn/icn/icn.c index 730bbd07ebc7..1e699bcaba0f 100644 --- a/drivers/isdn/icn/icn.c +++ b/drivers/isdn/icn/icn.c | |||
@@ -1519,12 +1519,11 @@ icn_initcard(int port, char *id) | |||
1519 | icn_card *card; | 1519 | icn_card *card; |
1520 | int i; | 1520 | int i; |
1521 | 1521 | ||
1522 | if (!(card = (icn_card *) kmalloc(sizeof(icn_card), GFP_KERNEL))) { | 1522 | if (!(card = kzalloc(sizeof(icn_card), GFP_KERNEL))) { |
1523 | printk(KERN_WARNING | 1523 | printk(KERN_WARNING |
1524 | "icn: (%s) Could not allocate card-struct.\n", id); | 1524 | "icn: (%s) Could not allocate card-struct.\n", id); |
1525 | return (icn_card *) 0; | 1525 | return (icn_card *) 0; |
1526 | } | 1526 | } |
1527 | memset((char *) card, 0, sizeof(icn_card)); | ||
1528 | spin_lock_init(&card->lock); | 1527 | spin_lock_init(&card->lock); |
1529 | card->port = port; | 1528 | card->port = port; |
1530 | card->interface.owner = THIS_MODULE; | 1529 | card->interface.owner = THIS_MODULE; |