Skip to content

Commit

Permalink
staging: vt6656: main_usb.c: Use kzalloc instead kmalloc
Browse files Browse the repository at this point in the history
Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com>
Cc: Forest Bond <forest@alittletooquiet.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Marcos Paulo de Souza authored and Greg Kroah-Hartman committed Nov 30, 2011
1 parent 428c1fb commit ac31e9e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/staging/vt6656/main_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@ static BOOL device_alloc_bufs(PSDevice pDevice) {
}

// allocate rcb mem
pDevice->pRCBMem = kmalloc((sizeof(RCB) * pDevice->cbRD), GFP_KERNEL);
pDevice->pRCBMem = kzalloc((sizeof(RCB) * pDevice->cbRD), GFP_KERNEL);
if (pDevice->pRCBMem == NULL) {
DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s : alloc rx usb context failed\n", pDevice->dev->name);
goto free_tx;
Expand All @@ -912,7 +912,6 @@ static BOOL device_alloc_bufs(PSDevice pDevice) {
pDevice->FirstRecvMngList = NULL;
pDevice->LastRecvMngList = NULL;
pDevice->NumRecvFreeList = 0;
memset(pDevice->pRCBMem, 0, (sizeof(RCB) * pDevice->cbRD));
pRCB = (PRCB) pDevice->pRCBMem;

for (ii = 0; ii < pDevice->cbRD; ii++) {
Expand Down

0 comments on commit ac31e9e

Please sign in to comment.