Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Leon Romanovsky and committed by
Jason Gunthorpe
333ee7e2 d11769fd

-4
-4
drivers/infiniband/hw/hfi1/mad.c
··· 4921 4921 { 4922 4922 switch (in_mad->base_version) { 4923 4923 case OPA_MGMT_BASE_VERSION: 4924 - if (unlikely(in_mad_size != sizeof(struct opa_mad))) { 4925 - dev_err(ibdev->dev.parent, "invalid in_mad_size\n"); 4926 - return IB_MAD_RESULT_FAILURE; 4927 - } 4928 4924 return hfi1_process_opa_mad(ibdev, mad_flags, port, 4929 4925 in_wc, in_grh, 4930 4926 (struct opa_mad *)in_mad,