aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/rio
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/rio')
-rw-r--r--drivers/char/rio/rio_linux.c4
-rw-r--r--drivers/char/rio/riocmd.c4
-rw-r--r--drivers/char/rio/riotable.c3
3 files changed, 3 insertions, 8 deletions
diff --git a/drivers/char/rio/rio_linux.c b/drivers/char/rio/rio_linux.c
index 294e9cb0c449..0ce96670f979 100644
--- a/drivers/char/rio/rio_linux.c
+++ b/drivers/char/rio/rio_linux.c
@@ -803,9 +803,7 @@ static void *ckmalloc(int size)
803{ 803{
804 void *p; 804 void *p;
805 805
806 p = kmalloc(size, GFP_KERNEL); 806 p = kzalloc(size, GFP_KERNEL);
807 if (p)
808 memset(p, 0, size);
809 return p; 807 return p;
810} 808}
811 809
diff --git a/drivers/char/rio/riocmd.c b/drivers/char/rio/riocmd.c
index 8cc60b693460..7321d002c34f 100644
--- a/drivers/char/rio/riocmd.c
+++ b/drivers/char/rio/riocmd.c
@@ -556,9 +556,7 @@ struct CmdBlk *RIOGetCmdBlk(void)
556{ 556{
557 struct CmdBlk *CmdBlkP; 557 struct CmdBlk *CmdBlkP;
558 558
559 CmdBlkP = kmalloc(sizeof(struct CmdBlk), GFP_ATOMIC); 559 CmdBlkP = kzalloc(sizeof(struct CmdBlk), GFP_ATOMIC);
560 if (CmdBlkP)
561 memset(CmdBlkP, 0, sizeof(struct CmdBlk));
562 return CmdBlkP; 560 return CmdBlkP;
563} 561}
564 562
diff --git a/drivers/char/rio/riotable.c b/drivers/char/rio/riotable.c
index 7e988357326e..991119c9f473 100644
--- a/drivers/char/rio/riotable.c
+++ b/drivers/char/rio/riotable.c
@@ -863,8 +863,7 @@ int RIOReMapPorts(struct rio_info *p, struct Host *HostP, struct Map *HostMapP)
863 if (PortP->TxRingBuffer) 863 if (PortP->TxRingBuffer)
864 memset(PortP->TxRingBuffer, 0, p->RIOBufferSize); 864 memset(PortP->TxRingBuffer, 0, p->RIOBufferSize);
865 else if (p->RIOBufferSize) { 865 else if (p->RIOBufferSize) {
866 PortP->TxRingBuffer = kmalloc(p->RIOBufferSize, GFP_KERNEL); 866 PortP->TxRingBuffer = kzalloc(p->RIOBufferSize, GFP_KERNEL);
867 memset(PortP->TxRingBuffer, 0, p->RIOBufferSize);
868 } 867 }
869 PortP->TxBufferOut = 0; 868 PortP->TxBufferOut = 0;
870 PortP->TxBufferIn = 0; 869 PortP->TxBufferIn = 0;