aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mlx5
diff options
context:
space:
mode:
authorYuval Shaia <yuval.shaia@oracle.com>2018-12-09 13:06:10 +0200
committerJason Gunthorpe <jgg@mellanox.com>2018-12-11 14:38:16 -0700
commit59590b8ad2eea9543a639880fc0d2c139b66d164 (patch)
treebd0ae698dc6ca467f7e82c293e3863cef61fdd71 /drivers/infiniband/hw/mlx5
parentRDMA/mlx5: Fail early if user tries to create flows on IB representors (diff)
downloadlinux-dev-59590b8ad2eea9543a639880fc0d2c139b66d164.tar.xz
linux-dev-59590b8ad2eea9543a639880fc0d2c139b66d164.zip
IB/{mlx5,ocrdma,qedr,rxe}: Omit port validation from IB verbs
RDMA core layer already make sure port is valid, no need to check it here again. For the pkey validation this depends on commit b3ac5742fead ("RDMA/core: Validate port number in query_pkey verb") Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com> Acked-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx5')
-rw-r--r--drivers/infiniband/hw/mlx5/mad.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/infiniband/hw/mlx5/mad.c b/drivers/infiniband/hw/mlx5/mad.c
index 00e5d29517ca..558638468edb 100644
--- a/drivers/infiniband/hw/mlx5/mad.c
+++ b/drivers/infiniband/hw/mlx5/mad.c
@@ -526,11 +526,6 @@ int mlx5_query_mad_ifc_port(struct ib_device *ibdev, u8 port,
int ext_active_speed;
int err = -ENOMEM;
- if (port < 1 || port > dev->num_ports) {
- mlx5_ib_warn(dev, "invalid port number %d\n", port);
- return -EINVAL;
- }
-
in_mad = kzalloc(sizeof(*in_mad), GFP_KERNEL);
out_mad = kmalloc(sizeof(*out_mad), GFP_KERNEL);
if (!in_mad || !out_mad)