diff options
author | Yan Burman <burman.yan@gmail.com> | 2006-12-02 06:38:14 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2006-12-05 19:31:32 -0500 |
commit | e6e3f12ad713fb878baa8e8b5456874a7ac714d3 (patch) | |
tree | 5d4faea415538a7a79c48d6e44c462ae4625812f /drivers | |
parent | b950e83b69a69f3db5ae64ab70b336886855517f (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.c | 3 |
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) | |||
11129 | return -EIO; | 11129 | return -EIO; |
11130 | 11130 | ||
11131 | if (cmdlog && !priv->cmdlog) { | 11131 | if (cmdlog && !priv->cmdlog) { |
11132 | priv->cmdlog = kmalloc(sizeof(*priv->cmdlog) * cmdlog, | 11132 | priv->cmdlog = kcalloc(cmdlog, sizeof(*priv->cmdlog), |
11133 | GFP_KERNEL); | 11133 | GFP_KERNEL); |
11134 | if (priv->cmdlog == NULL) { | 11134 | if (priv->cmdlog == NULL) { |
11135 | IPW_ERROR("Error allocating %d command log entries.\n", | 11135 | IPW_ERROR("Error allocating %d command log entries.\n", |
11136 | cmdlog); | 11136 | cmdlog); |
11137 | return -ENOMEM; | 11137 | return -ENOMEM; |
11138 | } else { | 11138 | } else { |
11139 | memset(priv->cmdlog, 0, sizeof(*priv->cmdlog) * cmdlog); | ||
11140 | priv->cmdlog_len = cmdlog; | 11139 | priv->cmdlog_len = cmdlog; |
11141 | } | 11140 | } |
11142 | } | 11141 | } |