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)
committerJakub Kicinski <kuba@kernel.org>
Fri, 21 Oct 2022 04:09:47 +0000 (21:09 -0700)
commit363cc87767f6ddcfb9158ad2e2afa2f8d5c4b94e
tree0aaa22c50a2c3f10299c932a34dbf05142dca6a5
parent4c1f602df8956bc0decdafd7e4fc7eef50c550b1
net: hinic: fix the issue of CMDQ memory leaks

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>
drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c