net/mlx5: Release resource on error flow
authorMoni Shoua <monis@mellanox.com>
Thu, 8 Nov 2018 19:10:08 +0000 (21:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Dec 2019 09:40:53 +0000 (10:40 +0100)
commitcfdcc8d6d0ab9aa41e9327c29ef0db16b1c99e24
treef5c2c21ac5c57ba4ca6cec8db176ceb91e947724
parentfd9beff0ccd0ef44078be23d6ce5ba431e23f292
net/mlx5: Release resource on error flow

[ Upstream commit 698114968a22f6c0c9f42e983ba033cc36bb7217 ]

Fix reference counting leakage when the event handler aborts due to an
unsupported event for the resource type.

Fixes: a14c2d4beee5 ("net/mlx5_core: Warn on unsupported events of QP/RQ/SQ")
Signed-off-by: Moni Shoua <monis@mellanox.com>
Reviewed-by: Majd Dibbiny <majd@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/qp.c