summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@mellanox.com>2019-10-29 08:27:36 +0200
committerJason Gunthorpe <jgg@mellanox.com>2019-11-12 20:20:14 -0400
commit333ee7e2d0b6590cde2bea3e17f30262e0dc0706 (patch)
treee701e6d51d9d77fb34211053e2b12304f954d2bf /drivers/infiniband
parentd11769fdc1bbf6664083c0caabd9f2f864dd72ec (diff)
downloadlinux-333ee7e2d0b6590cde2bea3e17f30262e0dc0706.tar.bz2
RDMA/hfi1: Delete unreachable code
All callers allocate MAD structures with proper sizes, there is no need to recheck it. Link: https://lore.kernel.org/r/20191029062745.7932-8-leon@kernel.org Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/hfi1/mad.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/hfi1/mad.c b/drivers/infiniband/hw/hfi1/mad.c
index d8ff063a5419..a54746f4a0ae 100644
--- a/drivers/infiniband/hw/hfi1/mad.c
+++ b/drivers/infiniband/hw/hfi1/mad.c
@@ -4921,10 +4921,6 @@ int hfi1_process_mad(struct ib_device *ibdev, int mad_flags, u8 port,
{
switch (in_mad->base_version) {
case OPA_MGMT_BASE_VERSION:
- if (unlikely(in_mad_size != sizeof(struct opa_mad))) {
- dev_err(ibdev->dev.parent, "invalid in_mad_size\n");
- return IB_MAD_RESULT_FAILURE;
- }
return hfi1_process_opa_mad(ibdev, mad_flags, port,
in_wc, in_grh,
(struct opa_mad *)in_mad,