IB/mlx5: Fix error unwinding when set_has_smi_cap fails
authorParav Pandit <parav@nvidia.com>
Wed, 13 Jan 2021 12:17:00 +0000 (14:17 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Jan 2021 17:27:32 +0000 (18:27 +0100)
commit5cd483a7e78800b56a20530ad7da209b11b41df0
tree9f20675dc6837809a58c708342094c247f68afae
parentbc296e43233ab8ac2250dcc8c9aa62baed54742f
IB/mlx5: Fix error unwinding when set_has_smi_cap fails

commit 2cb091f6293df898b47f4e0f2e54324e2bbaf816 upstream.

When set_has_smi_cap() fails, multiport master cleanup is missed. Fix it
by doing the correct error unwinding goto.

Fixes: a989ea01cb10 ("RDMA/mlx5: Move SMI caps logic")
Link: https://lore.kernel.org/r/20210113121703.559778-3-leon@kernel.org
Signed-off-by: Parav Pandit <parav@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/hw/mlx5/main.c