summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorKamal Heib <kamalheib1@gmail.com>2020-07-05 12:43:10 +0200
committerJason Gunthorpe <jgg@nvidia.com>2020-07-16 18:57:20 +0200
commit6112ef62826e91afbae5446d5d47b38e25f47e3f (patch)
tree7d8446af1525635008b2b0d21cc02a960db0390d /drivers/infiniband
parentRDMA/counter: Allow manually bind QPs with different pids to same counter (diff)
downloadlinux-6112ef62826e91afbae5446d5d47b38e25f47e3f.tar.xz
linux-6112ef62826e91afbae5446d5d47b38e25f47e3f.zip
RDMA/rxe: Drop pointless checks in rxe_init_ports
Both pkey_tbl_len and gid_tbl_len are set in rxe_init_port_param() - so no need to check if they aren't set. Fixes: 8700e3e7c485 ("Soft RoCE driver") Link: https://lore.kernel.org/r/20200705104313.283034-2-kamalheib1@gmail.com Signed-off-by: Kamal Heib <kamalheib1@gmail.com> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/sw/rxe/rxe.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe.c b/drivers/infiniband/sw/rxe/rxe.c
index 5642eefb4ba1..c7191b5e04a5 100644
--- a/drivers/infiniband/sw/rxe/rxe.c
+++ b/drivers/infiniband/sw/rxe/rxe.c
@@ -147,9 +147,6 @@ static int rxe_init_ports(struct rxe_dev *rxe)
rxe_init_port_param(port);
- if (!port->attr.pkey_tbl_len || !port->attr.gid_tbl_len)
- return -EINVAL;
-
port->pkey_tbl = kcalloc(port->attr.pkey_tbl_len,
sizeof(*port->pkey_tbl), GFP_KERNEL);