RDMA/mad: Do not check MAD sizes in roce and ib drivers
[linux-2.6-microblaze.git] / drivers / infiniband / hw / mlx5 / mad.c
index 0a5eb6e..f49d9c7 100644 (file)
@@ -280,10 +280,6 @@ int mlx5_ib_process_mad(struct ib_device *ibdev, int mad_flags, u8 port_num,
        struct ib_mad *out_mad = (struct ib_mad *)out;
        int ret;
 
-       if (WARN_ON_ONCE(in_mad_size != sizeof(*in_mad) ||
-                        *out_mad_size != sizeof(*out_mad)))
-               return IB_MAD_RESULT_FAILURE;
-
        if (MLX5_CAP_GEN(dev->mdev, vport_counters) &&
            in_mad->mad_hdr.mgmt_class == IB_MGMT_CLASS_PERF_MGMT &&
            in_mad->mad_hdr.method == IB_MGMT_METHOD_GET) {