mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
net: Convert vmalloc/memset to vzalloc
Signed-off-by: Joe Perches <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
This commit is contained in:
parent
8c1fec1ba8
commit
3dbd443983
2 changed files with 4 additions and 7 deletions
|
|
@ -375,23 +375,21 @@ static int rds_ib_setup_qp(struct rds_connection *conn)
|
|||
goto out;
|
||||
}
|
||||
|
||||
ic->i_sends = vmalloc_node(ic->i_send_ring.w_nr * sizeof(struct rds_ib_send_work),
|
||||
ic->i_sends = vzalloc_node(ic->i_send_ring.w_nr * sizeof(struct rds_ib_send_work),
|
||||
ibdev_to_node(dev));
|
||||
if (!ic->i_sends) {
|
||||
ret = -ENOMEM;
|
||||
rdsdebug("send allocation failed\n");
|
||||
goto out;
|
||||
}
|
||||
memset(ic->i_sends, 0, ic->i_send_ring.w_nr * sizeof(struct rds_ib_send_work));
|
||||
|
||||
ic->i_recvs = vmalloc_node(ic->i_recv_ring.w_nr * sizeof(struct rds_ib_recv_work),
|
||||
ic->i_recvs = vzalloc_node(ic->i_recv_ring.w_nr * sizeof(struct rds_ib_recv_work),
|
||||
ibdev_to_node(dev));
|
||||
if (!ic->i_recvs) {
|
||||
ret = -ENOMEM;
|
||||
rdsdebug("recv allocation failed\n");
|
||||
goto out;
|
||||
}
|
||||
memset(ic->i_recvs, 0, ic->i_recv_ring.w_nr * sizeof(struct rds_ib_recv_work));
|
||||
|
||||
rds_ib_recv_init_ack(ic);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue