Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d1e09ebf authored by Roland Dreier's avatar Roland Dreier
Browse files

RDMA/ocrdma: Fix assignment of max_srq_sge in device query



We want to set attr->max_srq_sge to dev->attr.max_srq_sge, not to itself.

This was detected by Coverity (CID 709210).

Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
parent 6887a413
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@ int ocrdma_query_device(struct ib_device *ibdev, struct ib_device_attr *attr)
	    min(dev->attr.max_ord_per_qp, dev->attr.max_ird_per_qp);
	attr->max_qp_init_rd_atom = dev->attr.max_ord_per_qp;
	attr->max_srq = (dev->attr.max_qp - 1);
	attr->max_srq_sge = attr->max_srq_sge;
	attr->max_srq_sge = dev->attr.max_srq_sge;
	attr->max_srq_wr = dev->attr.max_rqe;
	attr->local_ca_ack_delay = dev->attr.local_ca_ack_delay;
	attr->max_fast_reg_page_list_len = 0;