Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4b97eeb9 authored by Kamal Heib's avatar Kamal Heib Committed by Greg Kroah-Hartman
Browse files

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: 8700e3e7 ("Soft RoCE driver")
Link: https://lore.kernel.org/r/20200705104313.283034-2-kamalheib1@gmail.com


Signed-off-by: default avatarKamal Heib <kamalheib1@gmail.com>
Reviewed-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent e549e446
Loading
Loading
Loading
Loading
+0 −3
Original line number Original line Diff line number Diff line
@@ -163,9 +163,6 @@ static int rxe_init_ports(struct rxe_dev *rxe)


	rxe_init_port_param(port);
	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,
	port->pkey_tbl = kcalloc(port->attr.pkey_tbl_len,
			sizeof(*port->pkey_tbl), GFP_KERNEL);
			sizeof(*port->pkey_tbl), GFP_KERNEL);