projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aa0938c
)
qed: Remove useless set memory to zero use memset()
author
Wei Yongjun
<weiyongjun1@huawei.com>
Tue, 18 Oct 2016 15:54:50 +0000
(15:54 +0000)
committer
David S. Miller
<davem@davemloft.net>
Tue, 18 Oct 2016 18:26:00 +0000
(14:26 -0400)
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>
drivers/net/ethernet/qlogic/qed/qed_roce.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/qlogic/qed/qed_roce.c
b/drivers/net/ethernet/qlogic/qed/qed_roce.c
index 76831a398bedf024d299db1ffb68c1149664ace1..b11beb559981d908ab427b804a8f4e9cbaa18321 100644
(file)
--- a/
drivers/net/ethernet/qlogic/qed/qed_roce.c
+++ b/
drivers/net/ethernet/qlogic/qed/qed_roce.c
@@
-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;