mirror of https://gitee.com/openkylin/linux.git
RDMA/mlx5: Delete impossible inlen check
The inlen is set to be above zero in all flows before and can't be negative at this stage. Link: https://lore.kernel.org/r/20200427154636.381474-26-leon@kernel.org Reviewed-by: Maor Gottlieb <maorg@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
parent
03c4077b28
commit
0ce300b15a
|
@ -2107,11 +2107,6 @@ static int create_qp_common(struct mlx5_ib_dev *dev, struct ib_pd *pd,
|
|||
qp->flags &= ~IB_QP_CREATE_PCI_WRITE_END_PADDING;
|
||||
}
|
||||
|
||||
if (inlen < 0) {
|
||||
err = -EINVAL;
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (init_attr->qp_type == IB_QPT_RAW_PACKET ||
|
||||
qp->flags & IB_QP_CREATE_SOURCE_QPN) {
|
||||
qp->raw_packet_qp.sq.ubuffer.buf_addr = ucmd->sq_buf_addr;
|
||||
|
@ -2156,8 +2151,6 @@ static int create_qp_common(struct mlx5_ib_dev *dev, struct ib_pd *pd,
|
|||
destroy_qp_user(dev, pd, qp, base, udata);
|
||||
else
|
||||
destroy_qp_kernel(dev, qp);
|
||||
|
||||
err:
|
||||
kvfree(in);
|
||||
return err;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue