staging: dgnc: Use kcalloc instead of kzalloc.
authorNavya Sri Nizamkari <navyasri.tech@gmail.com>
Tue, 10 Mar 2015 12:01:04 +0000 (17:31 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Mar 2015 10:10:18 +0000 (11:10 +0100)
This patch uses kcalloc instead of kzalloc function.
A coccinelle script was used to make this change.

Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/dgnc/dgnc_driver.c

index 55b5e6b8f1b393807b445ee83a8232754e83f235..b322985f7b6ce42537040922670cfa1b307399bb 100644 (file)
@@ -409,7 +409,7 @@ static int dgnc_found_board(struct pci_dev *pdev, int id)
                return -ENOMEM;
 
        /* make a temporary message buffer for the boot messages */
-       brd->msgbuf_head = kzalloc(sizeof(u8) * 8192, GFP_KERNEL);
+       brd->msgbuf_head = kcalloc(8192, sizeof(u8), GFP_KERNEL);
        brd->msgbuf = brd->msgbuf_head;
 
        if (!brd->msgbuf) {