diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2016-08-28 09:58:34 +0200 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-09-02 20:11:39 +0200 |
commit | 24be409beede1a7cbe95b1740c4cdade3b6a8187 (patch) | |
tree | 1c039cb06687b12e48f914bd84d9789e2ff14396 /drivers/infiniband/hw/mlx5/qp.c | |
parent | IB/mlx4: Don't return errors from poll_cq (diff) | |
download | linux-24be409beede1a7cbe95b1740c4cdade3b6a8187.tar.xz linux-24be409beede1a7cbe95b1740c4cdade3b6a8187.zip |
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>
Diffstat (limited to 'drivers/infiniband/hw/mlx5/qp.c')
-rw-r--r-- | drivers/infiniband/hw/mlx5/qp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c index 0dd7d93cac95..acb3b72e719e 100644 --- a/drivers/infiniband/hw/mlx5/qp.c +++ b/drivers/infiniband/hw/mlx5/qp.c @@ -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; } |