diff options
author | Yan Burman <burman.yan@gmail.com> | 2006-12-02 12:38:14 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2006-12-06 01:31:32 +0100 |
commit | e6e3f12ad713fb878baa8e8b5456874a7ac714d3 (patch) | |
tree | 5d4faea415538a7a79c48d6e44c462ae4625812f /drivers/net | |
parent | [PATCH] prism54: replace kmalloc+memset with kzalloc (diff) | |
download | linux-e6e3f12ad713fb878baa8e8b5456874a7ac714d3.tar.xz linux-e6e3f12ad713fb878baa8e8b5456874a7ac714d3.zip |
[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/net')
-rw-r--r-- | drivers/net/wireless/ipw2200.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c index c692d01a76ca..b2e144b7f4a0 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; } } |