net/mlx5: prevent memory leak in mlx5_fpga_conn_create_cq
authorNavid Emamdoost <navid.emamdoost@gmail.com>
Wed, 25 Sep 2019 03:20:34 +0000 (22:20 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Nov 2019 18:20:57 +0000 (19:20 +0100)
commit42de3a902443b64c6e3cf9c61d9cd6f30b2c0d67
treee08b2fac8e2088ad92eb43c4effd92c19f2a39ce
parent7dfdcd9407f30ea86acb3b43fcfd3a92ce6a41fa
net/mlx5: prevent memory leak in mlx5_fpga_conn_create_cq

[ Upstream commit c8c2a057fdc7de1cd16f4baa51425b932a42eb39 ]

In mlx5_fpga_conn_create_cq if mlx5_vector2eqn fails the allocated
memory should be released.

Fixes: 537a50574175 ("net/mlx5: FPGA, Add high-speed connection routines")
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/fpga/conn.c