All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2.6.19] ipw2200: replace kmalloc+memset with kcalloc
@ 2006-12-02 11:38 Yan Burman
  0 siblings, 0 replies; only message in thread
From: Yan Burman @ 2006-12-02 11:38 UTC (permalink / raw)
  To: linux-kernel; +Cc: trivial

Replace kmalloc+memset with kcalloc

Signed-off-by: Yan Burman <burman.yan@gmail.com>

diff -rubp linux-2.6.19-rc5_orig/drivers/net/wireless/ipw2200.c linux-2.6.19-rc5_kzalloc/drivers/net/wireless/ipw2200.c
--- linux-2.6.19-rc5_orig/drivers/net/wireless/ipw2200.c	2006-11-09 12:16:21.000000000 +0200
+++ linux-2.6.19-rc5_kzalloc/drivers/net/wireless/ipw2200.c	2006-11-11 22:44:04.000000000 +0200
@@ -11129,14 +11129,13 @@ static int ipw_up(struct ipw_priv *priv)
 		return -EIO;
 
 	if (cmdlog && !priv->cmdlog) {
-		priv->cmdlog = kmalloc(sizeof(*priv->cmdlog) * cmdlog,
+		priv->cmdlog = kcalloc(cmdlog, sizeof(*priv->cmdlog),
 				       GFP_KERNEL);
 		if (priv->cmdlog == NULL) {
 			IPW_ERROR("Error allocating %d command log entries.\n",
 				  cmdlog);
 			return -ENOMEM;
 		} else {
-			memset(priv->cmdlog, 0, sizeof(*priv->cmdlog) * cmdlog);
 			priv->cmdlog_len = cmdlog;
 		}
 	}



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-12-02 11:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-02 11:38 [PATCH 2.6.19] ipw2200: replace kmalloc+memset with kcalloc Yan Burman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.