Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e6e3f12a authored by Yan Burman's avatar Yan Burman Committed by John W. Linville
Browse files

[PATCH] ipw2200: replace kmalloc+memset with kcalloc



Replace kmalloc+memset with kcalloc

Signed-off-by: default avatarYan Burman <burman.yan@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent b950e83b
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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;
		}
	}