IB/mlx5: Return EINVAL when caller specifies too many SGEs

The returned value should be EINVAL, because it is caused by wrong
caller and not by internal overflow event.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
Chuck Lever 2016-08-28 10:58:34 +03:00 committed by Doug Ledford
parent 20697434b6
commit 24be409bee
1 changed files with 1 additions and 1 deletions

View File

@ -3758,7 +3758,7 @@ int mlx5_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
num_sge = wr->num_sge;
if (unlikely(num_sge > qp->sq.max_gs)) {
mlx5_ib_warn(dev, "\n");
err = -ENOMEM;
err = -EINVAL;
*bad_wr = wr;
goto out;
}