diff options
| author | Kamal Heib <kamalheib1@gmail.com> | 2020-07-05 13:43:10 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-09-17 13:45:22 +0200 |
| commit | 4b97eeb917dca3202f84bcbb1442d7f737dea822 (patch) | |
| tree | 4ccea92a8feb5418fa3e92c67eb7d7cf7433f866 /drivers/infiniband/sw | |
| parent | e549e44694e9a9c07ac57d915d3efa417467fde8 (diff) | |
| download | linux-4b97eeb917dca3202f84bcbb1442d7f737dea822.tar.gz linux-4b97eeb917dca3202f84bcbb1442d7f737dea822.tar.bz2 linux-4b97eeb917dca3202f84bcbb1442d7f737dea822.zip | |
RDMA/rxe: Drop pointless checks in rxe_init_ports
[ Upstream commit 6112ef62826e91afbae5446d5d47b38e25f47e3f ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/infiniband/sw')
| -rw-r--r-- | drivers/infiniband/sw/rxe/rxe.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe.c b/drivers/infiniband/sw/rxe/rxe.c index 10999fa69281..94dedabe648c 100644 --- a/drivers/infiniband/sw/rxe/rxe.c +++ b/drivers/infiniband/sw/rxe/rxe.c @@ -163,9 +163,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); |
