From: Yan Burman Date: Sat, 2 Dec 2006 11:38:14 +0000 (+0200) Subject: [PATCH] ipw2200: replace kmalloc+memset with kcalloc X-Git-Tag: v2.6.20-rc1~145^2^2~6^2~3^2~6 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=e6e3f12ad713fb878baa8e8b5456874a7ac714d3;p=linux-2.6-omap-h63xx.git [PATCH] ipw2200: replace kmalloc+memset with kcalloc Replace kmalloc+memset with kcalloc Signed-off-by: Yan Burman Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c index c692d01a76c..b2e144b7f4a 100644 --- a/drivers/net/wireless/ipw2200.c +++ b/drivers/net/wireless/ipw2200.c @@ -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; } }