aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/capi/capidrv.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn/capi/capidrv.c')
-rw-r--r--drivers/isdn/capi/capidrv.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/isdn/capi/capidrv.c b/drivers/isdn/capi/capidrv.c
index b6f9476c0501..097bfa7bc323 100644
--- a/drivers/isdn/capi/capidrv.c
+++ b/drivers/isdn/capi/capidrv.c
@@ -334,12 +334,11 @@ static capidrv_plci *new_plci(capidrv_contr * card, int chan)
334{ 334{
335 capidrv_plci *plcip; 335 capidrv_plci *plcip;
336 336
337 plcip = (capidrv_plci *) kmalloc(sizeof(capidrv_plci), GFP_ATOMIC); 337 plcip = kzalloc(sizeof(capidrv_plci), GFP_ATOMIC);
338 338
339 if (plcip == 0) 339 if (plcip == 0)
340 return NULL; 340 return NULL;
341 341
342 memset(plcip, 0, sizeof(capidrv_plci));
343 plcip->state = ST_PLCI_NONE; 342 plcip->state = ST_PLCI_NONE;
344 plcip->plci = 0; 343 plcip->plci = 0;
345 plcip->msgid = 0; 344 plcip->msgid = 0;
@@ -404,12 +403,11 @@ static inline capidrv_ncci *new_ncci(capidrv_contr * card,
404{ 403{
405 capidrv_ncci *nccip; 404 capidrv_ncci *nccip;
406 405
407 nccip = (capidrv_ncci *) kmalloc(sizeof(capidrv_ncci), GFP_ATOMIC); 406 nccip = kzalloc(sizeof(capidrv_ncci), GFP_ATOMIC);
408 407
409 if (nccip == 0) 408 if (nccip == 0)
410 return NULL; 409 return NULL;
411 410
412 memset(nccip, 0, sizeof(capidrv_ncci));
413 nccip->ncci = ncci; 411 nccip->ncci = ncci;
414 nccip->state = ST_NCCI_NONE; 412 nccip->state = ST_NCCI_NONE;
415 nccip->plcip = plcip; 413 nccip->plcip = plcip;
@@ -2005,12 +2003,11 @@ static int capidrv_addcontr(u16 contr, struct capi_profile *profp)
2005 printk(KERN_WARNING "capidrv: (%s) Could not reserve module\n", id); 2003 printk(KERN_WARNING "capidrv: (%s) Could not reserve module\n", id);
2006 return -1; 2004 return -1;
2007 } 2005 }
2008 if (!(card = (capidrv_contr *) kmalloc(sizeof(capidrv_contr), GFP_ATOMIC))) { 2006 if (!(card = kzalloc(sizeof(capidrv_contr), GFP_ATOMIC))) {
2009 printk(KERN_WARNING 2007 printk(KERN_WARNING
2010 "capidrv: (%s) Could not allocate contr-struct.\n", id); 2008 "capidrv: (%s) Could not allocate contr-struct.\n", id);
2011 return -1; 2009 return -1;
2012 } 2010 }
2013 memset(card, 0, sizeof(capidrv_contr));
2014 card->owner = THIS_MODULE; 2011 card->owner = THIS_MODULE;
2015 init_timer(&card->listentimer); 2012 init_timer(&card->listentimer);
2016 strcpy(card->name, id); 2013 strcpy(card->name, id);