提交 4251e747 编写于 作者: W Wei Yongjun 提交者: David S. Miller

qed: Remove useless set memory to zero use memset()

The memory return by kzalloc() has already be set to zero, so
remove useless memset(0).
Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 aa0938c6
...@@ -2747,7 +2747,6 @@ static int qed_roce_ll2_start(struct qed_dev *cdev, ...@@ -2747,7 +2747,6 @@ static int qed_roce_ll2_start(struct qed_dev *cdev,
DP_ERR(cdev, "qed roce ll2 start: failed memory allocation\n"); DP_ERR(cdev, "qed roce ll2 start: failed memory allocation\n");
return -ENOMEM; return -ENOMEM;
} }
memset(roce_ll2, 0, sizeof(*roce_ll2));
roce_ll2->handle = QED_LL2_UNUSED_HANDLE; roce_ll2->handle = QED_LL2_UNUSED_HANDLE;
roce_ll2->cbs = params->cbs; roce_ll2->cbs = params->cbs;
roce_ll2->cb_cookie = params->cb_cookie; roce_ll2->cb_cookie = params->cb_cookie;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册