octeontx2-pf: Fix resource leakage in VF driver unbind
authorHariprasad Kelam <hkelam@marvell.com>
Mon, 9 Jan 2023 06:13:25 +0000 (11:43 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:58:31 +0000 (11:58 +0100)
commitc8ca0ad10df08ea36bcac1288062d567d22604c9
treeeb67b10b47971547d0cb83f00f2364b121c13769
parent0daf5f4a1eef482be8f59c6d0b39a413dbaf235e
octeontx2-pf: Fix resource leakage in VF driver unbind

[ Upstream commit 53da7aec32982f5ee775b69dce06d63992ce4af3 ]

resources allocated like mcam entries to support the Ntuple feature
and hash tables for the tc feature are not getting freed in driver
unbind. This patch fixes the issue.

Fixes: 2da489432747 ("octeontx2-pf: devlink params support to set mcam entry count")
Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
Link: https://lore.kernel.org/r/20230109061325.21395-1-hkelam@marvell.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c