diff options
author | Yuval Shaia <yuval.shaia@oracle.com> | 2018-12-09 13:06:10 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-12-11 14:38:16 -0700 |
commit | 59590b8ad2eea9543a639880fc0d2c139b66d164 (patch) | |
tree | bd0ae698dc6ca467f7e82c293e3863cef61fdd71 /drivers/infiniband/hw/mlx5/mad.c | |
parent | a1462351b590a4fa8eed6e5bf14245425635be0d (diff) |
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/mad.c')
-rw-r--r-- | drivers/infiniband/hw/mlx5/mad.c | 5 |
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) |