Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1201654

[PATCH] Staging: unisys: visornic: Use kcalloc instead of kzalloc.

From Shraddha Barke <shraddha.6596@gmail.com>
Newsgroups linux.kernel
Subject [PATCH] Staging: unisys: visornic: Use kcalloc instead of kzalloc.
Date 2015-08-06 13:20 +0200
Message-ID <pUrnj-7jc-9@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


This patch uses kcalloc instead of kzalloc function.

The change was made using Coccinelle.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
---
 drivers/staging/unisys/visornic/visornic_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c
index 2a9b055..e4a7b9b5 100644
--- a/drivers/staging/unisys/visornic/visornic_main.c
+++ b/drivers/staging/unisys/visornic/visornic_main.c
@@ -1843,8 +1843,8 @@ static int visornic_probe(struct visor_device *dev)
 		goto cleanup_netdev;
 	}
 
-	devdata->rcvbuf = kzalloc(sizeof(struct sk_buff *) *
-				  devdata->num_rcv_bufs, GFP_KERNEL);
+	devdata->rcvbuf = kcalloc(devdata->num_rcv_bufs,
+				  sizeof(struct sk_buff *), GFP_KERNEL);
 	if (!devdata->rcvbuf) {
 		err = -ENOMEM;
 		goto cleanup_rcvbuf;
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH] Staging: unisys: visornic: Use kcalloc instead of kzalloc. Shraddha Barke <shraddha.6596@gmail.com> - 2015-08-06 13:20 +0200

csiph-web