forked from luck/tmp_suning_uos_patched
IB/mlx4: Handle -ENOMEM in forward_trap()
ib_create_send_mad() can return ERR_PTR(-ENOMEM) here. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
This commit is contained in:
parent
030b4b3309
commit
1397490938
@ -211,6 +211,8 @@ static void forward_trap(struct mlx4_ib_dev *dev, u8 port_num, struct ib_mad *ma
|
||||
if (agent) {
|
||||
send_buf = ib_create_send_mad(agent, qpn, 0, 0, IB_MGMT_MAD_HDR,
|
||||
IB_MGMT_MAD_DATA, GFP_ATOMIC);
|
||||
if (IS_ERR(send_buf))
|
||||
return;
|
||||
/*
|
||||
* We rely here on the fact that MLX QPs don't use the
|
||||
* address handle after the send is posted (this is
|
||||
|
Loading…
Reference in New Issue
Block a user