aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorYan Burman <burman.yan@gmail.com>2006-12-02 13:38:14 +0200
committerJohn W. Linville <linville@tuxdriver.com>2006-12-05 19:31:32 -0500
commite6e3f12ad713fb878baa8e8b5456874a7ac714d3 (patch)
tree5d4faea415538a7a79c48d6e44c462ae4625812f /drivers
parentb950e83b69a69f3db5ae64ab70b336886855517f (diff)
[PATCH] ipw2200: replace kmalloc+memset with kcalloc
Replace kmalloc+memset with kcalloc Signed-off-by: Yan Burman <burman.yan@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ipw2200.c3
1 files changed, 1 insertions, 2 deletions
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;
}
}