Skip to content

Commit

Permalink
qed: Remove useless set memory to zero use memset()
Browse files Browse the repository at this point in the history
The memory return by kzalloc() has already be set to zero, so
remove useless memset(0).

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Wei Yongjun authored and David S. Miller committed Oct 18, 2016
1 parent aa0938c commit 4251e74
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/net/ethernet/qlogic/qed/qed_roce.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
return -ENOMEM;
}
memset(roce_ll2, 0, sizeof(*roce_ll2));
roce_ll2->handle = QED_LL2_UNUSED_HANDLE;
roce_ll2->cbs = params->cbs;
roce_ll2->cb_cookie = params->cb_cookie;
Expand Down

0 comments on commit 4251e74

Please sign in to comment.