Skip to content

Commit

Permalink
[PATCH] ipw2200: replace kmalloc+memset with kcalloc
Browse files Browse the repository at this point in the history
Replace kmalloc+memset with kcalloc

Signed-off-by: Yan Burman <burman.yan@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Yan Burman authored and John W. Linville committed Dec 6, 2006
1 parent b950e83 commit e6e3f12
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/wireless/ipw2200.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit e6e3f12

Please sign in to comment.