Skip to contentSkip to conversation

Staging: unisys: visornic: Use kcalloc instead of kzalloc.

PATCH Superseded Shraddha Barke 1 participant 1 message Aug 6, 2015 Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: unisys: visornic: Use kcalloc instead of kzalloc.

This patch uses kcalloc instead of kzalloc function.

The change was made using Coccinelle.

---
 drivers/staging/unisys/visornic/visornic_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/unisys/visornic/visornic_main.c +2 -2
index 2a9b055..e4a7b9b5 100644
@@ -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;
Signature · 1 line
2.1.0