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:59:15 +0000 (23:59 +0900)
commit6016d96a6adf66d61655d85da02e1a4c1deccbd6
tree1cc11850dda13ab92f851bd25fdbfefbb06062eb
parente6765fe8de372a84f8dbe9e03ec13c7c70f946b8
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