Message ID | b5e9c62f6b8369acab5648b661bf539cbceeffdc.1669636336.git.leonro@nvidia.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | [rdma-next,1/2] RDMA/nldev: Add NULL check to silence false warnings | expand |
diff --git a/drivers/infiniband/core/nldev.c b/drivers/infiniband/core/nldev.c index 1c5f4452e8db..afd8d65f749d 100644 --- a/drivers/infiniband/core/nldev.c +++ b/drivers/infiniband/core/nldev.c @@ -513,7 +513,7 @@ static int fill_res_qp_entry(struct sk_buff *msg, bool has_cap_net_admin, /* In create_qp() port is not set yet */ if (qp->port && nla_put_u32(msg, RDMA_NLDEV_ATTR_PORT_INDEX, qp->port)) - return -EINVAL; + return -EMSGSIZE; ret = nla_put_u32(msg, RDMA_NLDEV_ATTR_RES_LQPN, qp->qp_num); if (ret)