Skip to content

Commit

Permalink
RDMA/rxe: Drop pointless checks in rxe_init_ports
Browse files Browse the repository at this point in the history
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: 8700e3e ("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>
  • Loading branch information
Kamal Heib authored and Jason Gunthorpe committed Jul 16, 2020
1 parent cbeb7d8 commit 6112ef6
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/infiniband/sw/rxe/rxe.c
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit 6112ef6

Please sign in to comment.