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

Commit f687ccea authored by Gal Pressman's avatar Gal Pressman Committed by Jason Gunthorpe
Browse files

RDMA/uverbs: Fix post send success return value in case of error



If get QP object fails 'ret' must be assigned with a proper error code.

Fixes: 9a073857 ("RDMA/uverbs: Use uverbs_response() for remaining response copying")
Signed-off-by: default avatarGal Pressman <galpress@amazon.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent bfeffd15
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2012,8 +2012,10 @@ static int ib_uverbs_post_send(struct uverbs_attr_bundle *attrs)
		return -ENOMEM;

	qp = uobj_get_obj_read(qp, UVERBS_OBJECT_QP, cmd.qp_handle, attrs);
	if (!qp)
	if (!qp) {
		ret = -EINVAL;
		goto out;
	}

	is_ud = qp->qp_type == IB_QPT_UD;
	sg_ind = 0;