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/hisax/fsm.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/hisax/fsm.c')
-rw-r--r-- | drivers/isdn/hisax/fsm.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/isdn/hisax/fsm.c b/drivers/isdn/hisax/fsm.c index 0d44a3f480ac..34fade96a581 100644 --- a/drivers/isdn/hisax/fsm.c +++ b/drivers/isdn/hisax/fsm.c | |||
@@ -26,12 +26,10 @@ FsmNew(struct Fsm *fsm, struct FsmNode *fnlist, int fncount) | |||
26 | int i; | 26 | int i; |
27 | 27 | ||
28 | fsm->jumpmatrix = (FSMFNPTR *) | 28 | fsm->jumpmatrix = (FSMFNPTR *) |
29 | kmalloc(sizeof (FSMFNPTR) * fsm->state_count * fsm->event_count, GFP_KERNEL); | 29 | kzalloc(sizeof (FSMFNPTR) * fsm->state_count * fsm->event_count, GFP_KERNEL); |
30 | if (!fsm->jumpmatrix) | 30 | if (!fsm->jumpmatrix) |
31 | return -ENOMEM; | 31 | return -ENOMEM; |
32 | 32 | ||
33 | memset(fsm->jumpmatrix, 0, sizeof (FSMFNPTR) * fsm->state_count * fsm->event_count); | ||
34 | |||
35 | for (i = 0; i < fncount; i++) | 33 | for (i = 0; i < fncount; i++) |
36 | if ((fnlist[i].state>=fsm->state_count) || (fnlist[i].event>=fsm->event_count)) { | 34 | if ((fnlist[i].state>=fsm->state_count) || (fnlist[i].event>=fsm->event_count)) { |
37 | printk(KERN_ERR "FsmNew Error line %d st(%ld/%ld) ev(%ld/%ld)\n", | 35 | printk(KERN_ERR "FsmNew Error line %d st(%ld/%ld) ev(%ld/%ld)\n", |