net: hinic: fix the issue of CMDQ memory leaks
authorZhengchao Shao <shaozhengchao@huawei.com>
Wed, 19 Oct 2022 09:57:53 +0000 (17:57 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Nov 2022 14:57:51 +0000 (23:57 +0900)
commit6603843c80b16957f5d7d14d897faf13cef2b8b9
tree8fb0904d0973ba33c087a610f9b8d117543de2f5
parentbb01910763f935b16538084b4269696e0de17f79
net: hinic: fix the issue of CMDQ memory leaks

[ Upstream commit 363cc87767f6ddcfb9158ad2e2afa2f8d5c4b94e ]

When hinic_set_cmdq_depth() fails in hinic_init_cmdqs(), the cmdq memory is
not released correctly. Fix it.

Fixes: 72ef908bb3ff ("hinic: add three net_device_ops of vf")
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c