|
@@ -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;
|
|
|
}
|
|
|
}
|