aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hisax/fsm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn/hisax/fsm.c')
-rw-r--r--drivers/isdn/hisax/fsm.c4
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",